#Possible to *not* Bake certain objects.. [SOLVED]

1 messages · Page 1 of 1 (latest)

chilly oxide
#

I have a parent object in my subscene which uses child gameobjects to get values etc however i'd like the children to not be baked/converted to entities - is this possible?

silk ridge
#

From memory, add the BakingOnlyEntity component to them

#

Oh or easier
add BakingOnlyEntityAuthoring to the gameobject

#
    /// Add a BakingOnlyEntity authoring component to your game object to mark it as Bake Only. It and all children will be
    /// stripped out before they appear in the live game world. Its additional entities and its children additional entities
    /// are exempt from this and will appear in the live game world.
    /// </summary>
    [DisallowMultipleComponent]
    public class BakingOnlyEntityAuthoring : MonoBehaviour { }```
chilly oxide
#

Sadly getting some errors from this 😐

silk ridge
#

What errors?

chilly oxide
#

It was two errors relating to invalid entity

#

So the other part that i can reproduce was:

#

part of the hierarchy of one of these child objects was a gameobject that is also used in a prefab that is referenced and baked in a separate baker object

#

so that gameobject wasn't being removed by the BakingOnlyEntityAuthoring that was applied to the parent

#

everything was being removed, except from these certain objects

#

i think the reason these objects were tripping it up, is that they share a 1/1 relationship with the prefab version 🤷

#

so - the objects that were not being removed, just happened to also have prefabs based on them

#

hard to explain

#

luckily i didn't require them to be part of this hierarchy so just removed them