Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: dasbin on February 06, 2012, 04:04:53 PM
-
This is using Javascript.
Trying to get a FsmGameObject (global var) from PlayMaker and store it into a GameObject var in my script.
Right now I have:
grabZone = grabFSM.FsmVariables.GlobalVariables.GetFsmGameObject("currentGrabZone");
This gives me the error: BCE0022: Cannot convert 'HutongGames.PlayMaker.FsmGameObject' to 'UnityEngine.GameObject'.
How do I convert to a usable GameObject?
-
Get the Value property.
grabZone = grabFSM.FsmVariables.GlobalVariables.GetFsmGameObject("currentGrabZone").Value;
But you probably want to check for null first...