unity-entity-component-system
unity-entity-component-system copied to clipboard
Add isInitialized check to OnDestroy() in EntityComponent
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.