Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: createasaurus on December 24, 2014, 08:35:48 AM
-
I have a Game Object with lots of children. I would like to switch the layer of all of these. I'm using Set Property: Property: Layer - then inputting a layer number. I am doing this for each child individually. I fear when my project grows, doing it this way will be increasingly difficult to keep track of.
Is there a way to simply Set Property of the Parent GameObject and Include Children?
Thank you very much!
-
Hi, I'm using this to change layers for gameObject with children:
http://hutonggames.com/playmakerforum/index.php?topic=982.msg4060#msg4060
-
Some actions have a 'recursive' option to set the children as well. 'Activate' game object is one of them. But these are actions set up to do stuff.
The 'get property' and 'set property' don't. Use them when no actions have been made to do what you want or when you need a high level of detail.
Of course, you or someone else could make up an action to do what you want as well.
-
You could cycle through all the children gameObjects using the "Get next child" action
-
@600
Thank you so much! This action does Exactly what I needed.
@wheretheidivides
Thanks for the tips! I'm just starting using get and set property - and realizing that children are not included with these.
Of course, you or someone else could make up an action to do what you want as well.
Good news is it looks like someone did, because I specifically need this for layers - per 600's post.
@LampRabit
Thank you. I didn't know about "get next child" and will keep in mind for future needs.
-
@600 your action works beautifully. Thanks for posting it! Saved me a ton of time and headaches.