#Prefab processing.

1 messages · Page 1 of 1 (latest)

spiral maple
#

I'm trying to get my head around doing more complicated things with baking than just directly turning prefabs into entities. We have a monobehaviour on the root GameObject of the prefab that has a list of links to child objects. I'd like to come out of the other side of the baking process with each of those child objects having a component attached that I can use to find them later. What's the best way to go about doing that?

spiral maple
#

I guess another way would be to add a monobehavior to the child objects that need processing. I know there are some default Unity monobehaviours (like particlesystem) that are preserved when a prefab is imported. Is there a way to add user defined monobehaviours to that list?

rigid linden
#

You can add a baking only tag component to the root gameobject, then make a baking system that iterates all entities that have a parent and check if the parent has the tag component. Or LinkedEntityGroup might be the right one? Forgot which one is used by default

rigid linden
merry notch
#

thank you for reply.

rigid linden
#

oh yea, always loop through them manually unfortunately