Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Grezod on March 22, 2016, 09:21:23 AM
-
i'm a rookie in uinty
i use playmaker create a int global variable name "Score"
but i dont know how to set a variable in C# and value same with Score
can some one post me a detail code use in C# like
"int score = XXXXXXXXXXXXX(Score)"
and where i can know about playmaker code in C#?
-
Set up the Using references:
using HutongGames.PlayMaker;
using HutongGames.PlayMaker.Actions;
Declare your variables:
public PlayMakerFSM theFSM;
private Texture2D FSMvar;
Then reference them: (this is setting a texture FSM variable from another tex and myObj represents the object that has the FSM I want to talk to)
theFSM = myObj.GetComponent<PlayMakerFSM>();
theFSM.FsmVariables.GetFsmTexture("newInventoryItem").Value =tex;
-
thx u bro!
-
Thanks this help me a lot.