Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: christougher on August 20, 2015, 04:52:42 AM

Title: Assign GameObject as a public Gameobject in a script
Post by: christougher on August 20, 2015, 04:52:42 AM
Is there a way for playmaker to assign a gameobject in the scene as a public variable in a script?  Or does this require programming within the actual script itself.  Being able to assign FSM values to public variables would be really really handy.

I would start with FindGameObject but then I'm not sure from there...

Thanks!
Title: Re: Assign GameObject as a public Gameobject in a script
Post by: sebaslive on August 20, 2015, 10:38:34 AM
you can convert the script to work in Playmaker and you would change it as

public FsmGameObject variable;

look at other actions as an example of all the changes that have to be made.

If you are not scripting and you can do this in actions by grabbing the script that has the public variable and placing it into any action. This will allow you to choose set property and then in the drop down you look for that variable and insert the one you want in the playmaker action.

Find game object is taxing so try not to use it so much.