playMaker

Author Topic: Get value of c# public var[SOLVED]  (Read 1608 times)

adrian34

  • Playmaker Newbie
  • *
  • Posts: 4
Get value of c# public var[SOLVED]
« on: March 13, 2017, 04:35:52 AM »
Hi community,

I have a set of vars exposed to the inspector via public declarations (mostly floats and a boolean or two), from a c# script. They control main camera placement and movement, specifically distance, height, and a back/front view switch.

How can I create an FSM to manipulate these values upon key press, so I can have more angles using the same camGO?

My plan is to be able to switch between 3-4 different value sets, so I suppose getting the start values from the variables declared within the c# script is the first step. But what action(s) should I use in order to do this?

Thanks,
Adrian
« Last Edit: March 13, 2017, 01:19:48 PM by jeanfabre »

pXd

  • Playmaker Newbie
  • *
  • Posts: 29
Re: Get value of c# public var
« Reply #1 on: March 13, 2017, 04:56:34 AM »
Click and drag the script title from the inspector to the action area in playmaker, you'll get a popup menu "Get property" or "Set property" and you can then choose what you want to get/set.

This is one way to do it, there are others.
« Last Edit: March 13, 2017, 05:08:25 AM by pXd »

adrian34

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Get value of c# public var
« Reply #2 on: March 13, 2017, 05:59:12 AM »
That easy, huh? Thanks pXd, it worked. :)

pXd

  • Playmaker Newbie
  • *
  • Posts: 29
Re: Get value of c# public var
« Reply #3 on: March 13, 2017, 05:59:47 AM »
That easy, huh? Thanks pXd, it worked. :)

No worries, glad it worked for you :)