playMaker

Author Topic: Assign GameObject as a public Gameobject in a script  (Read 1554 times)

christougher

  • Playmaker Newbie
  • *
  • Posts: 36
Assign GameObject as a public Gameobject in a script
« 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!

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Assign GameObject as a public Gameobject in a script
« Reply #1 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.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez