How do I mark an entity as changed from my authoring component? I have a few systems running expensive operations in the editor and at runtime. I need a way to only perform these operations on entities that have been marked as changed. Otherwise I would perform expensive calculations just to get the same results I already had. Waste of compute power.
My first thought was to use enableable tag components. I would enable them in my baker, then the system would perform its calculations and disable the tags. Problem with this solution was that the bakers were unable to toggle the flag on again after the systems had toggled it off. Weird considering the baker re-adds the component on each bake, but can probably be explained by how enableable components work under the hood.
Second approach I tried was to add the tag in the baker, then remove it in my system. This seemingly worked until my bakers started to freak out during their undo process. The baker knew it had added the tag, but when it tried to remove it, the component was already gone, and so I got an error.
Any idea on how to go about this? Is there a data-oriented approach that is more suitable or is bakers the right path?