Hello. I just purchased PlayMaker and can't wait to integrate it into my game. I've already hit a big snag though. It is about accessing public variables. Yeah, I've read some forum topics about it. Honestly what I've read has made no sense whatsoever. Being that accessing other scripts are a big part of Unity, there must be a way for PlayMaker to access other scripts.
So here is the setup I'm trying to solve. I've got a prefab with a lot of components on it (all written in c#). I have one script (PieceScore.cs) which carries a public bool value that I need playmaker to access.
The FSM is another component on the same game object. Now if I needed to access it as a c# script, I could do:
PieceScore example = GetComponent<PieceScore>();
Then I could access all the public variables using:
//for example if the variable is named isSelected
example.isSelected;
Ok, so the first thing I tried using Playmaker is GetComponent. Now here is where I get confused. GetComponent in playmaker doesn't allow you to specify a component to get. Is it getting all the components on the gameObject? Is it working at all? All I can do is specify the game object and store it into a variable. Not exactly what I was expecting.
From there, GetValue. Didn't help. So its not working like I expected it would. I must be missing something.
I read something about using send method, but those are to functions. All I need to do is read/write to an existing public c# variable. I'm hoping that this won't mean a total rewrite from the ground up in order to do something that is simple in coding terms. Not to mention that since doing something like this is a cornerstone of Unity itself, it had to be somehow integrated into playmaker.