#Possible to *not* Bake certain objects.. [SOLVED]
1 messages · Page 1 of 1 (latest)
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 { }```
Aha! Thanks.. how did you find out about this? I've been trawling decompiled IBaker etc trying to find a way..
Sadly getting some errors from this 😐
What errors?
I've managed to get rid of it and can't get it back, but i can reproduce part of the problem:
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