Skip to content

Add isInitialized check to OnDestroy() in EntityComponent#32

Open
AlexMeesters wants to merge 1 commit intojeffreylanters:masterfrom
AlexMeesters:master
Open

Add isInitialized check to OnDestroy() in EntityComponent#32
AlexMeesters wants to merge 1 commit intojeffreylanters:masterfrom
AlexMeesters:master

Conversation

@AlexMeesters
Copy link
Copy Markdown
Contributor

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.

Added isInitialized check to OnDestroy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants