Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Andy22 on August 21, 2013, 08:29:52 AM

Title: FsmEventTarget, enum EventTarget { root, parent }
Post by: Andy22 on August 21, 2013, 08:29:52 AM
Hi,

i know i can use variables + getRoot/Parent, but those are common operations and having the root/parent directly inside the enum would be nice.

thx Andy
Title: Re: FsmEventTarget, enum EventTarget { root, parent }
Post by: jeanfabre on August 24, 2013, 04:23:51 AM
Hi,

 Yes, I would love that too!

We should have get parent AND get root, parent being the direct parent, and root being the top most parent of the hierarchy.

bye,

Jean
Title: Re: FsmEventTarget, enum EventTarget { root, parent }
Post by: Andy22 on August 24, 2013, 06:42:56 AM
Yep, the way unity handles serialization often forces me to use a gameobject + monobehaviour, so we end up with some hierarchy of gameobjects that function together.

In many cases this hierarchy is kinda "loose" means most special setup is done on the root object and several subobjects add functionality. I did setup common operation this way that if i look for a FSM or component i first look on the same gameobject, than the parent and finally the root, if this fails i look from root inside all childs.

This logic works so far and i don't need to setup special references for my common behaviors.
Title: Re: FsmEventTarget, enum EventTarget { root, parent }
Post by: Alex Chouls on August 25, 2013, 02:53:41 PM
I agree this would be useful. I'll look into it...

SendMessageUpwards might also be useful in these situations.