playMaker

Author Topic: Prefabs: drag gameobject into state, auto find that gameobject  (Read 3066 times)

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
Hey,
Something I seem to spend a bit of time doing with prefabs is having to always setup the same old 'find game object by name', enter that name, store the gameobject, etc.

For example if I have a prefab with 'move towards' on it, I have to first find what I want it to move to, and I can't just drag it into the target object field because its a prefab and that doesn't work.

What would be nice, if this is even possible, would be if I drag a gameobject into an action on that prefab, it assumes I want to create an action "find gameobject", grab the name from that gameobject, automatically enter and store it.

I suppose right now getting components works a bit like this. So not sure how you'd do both. Maybe add to the get/set property/send message list a "find gameobject" option?

Cheers,
Jay

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Prefabs: drag gameobject into state, auto find that gameobject
« Reply #1 on: March 25, 2015, 05:18:21 PM »
Experimenting with dragging game objects is a problem that still have. Would you say the alternative to adding a fsm that is more complex, assuming that a FSM would be attached to the object that you are dragging right?