unity-entity-component-system icon indicating copy to clipboard operation
unity-entity-component-system copied to clipboard

Add isInitialized check to OnDestroy() in EntityComponent

Open AlexMeesters opened this issue 9 months ago • 0 comments

OnDestroy can still get called on components that are disabled by default (have never been activated)

In some cases this causes a race condition where the system has already been destroyed when OnDestroy() is called. It may be that inactive components (that have never been activated) have a different execution order.

AlexMeesters avatar Feb 26 '25 13:02 AlexMeesters