I have a BakingSystem that accesses and then removes a component of a set of entities, each managed by another Baker. Problem is that every time the scene re-bakes, that BakingSystem is run again on the same set of entities, and tries to access a the component that was already removed on the previous bake. Is there a way for the BakingSystem and its own Baker to "depend" on the other Baker? That component is used for setup purposes, hence why I'm trying to remove it
#Removing Component in BakingSystems causing issues
1 messages · Page 1 of 1 (latest)
Would this involve doing WithAll<BakedEntity> to only process entities that changed, and calling DependsOn(otherBakerAuthoring) to keep track of things?
dont you just have to include the component you are going to remove in the query? that way only entities that actually have the component because they were rebaked will have the component removed.
i.e: WithAll<BakingOnlyComponentToRemove>
or better yet just use baking only components that are automatically removed for you
use [TemporaryBakingType] for that