Fix Singleton not calling OnDestroyed() event

This commit is contained in:
Anton Tarasenko 2020-07-18 02:37:20 +07:00
parent 740f98edbd
commit 507c7ba12c

View File

@ -91,9 +91,10 @@ event PreBeginPlay()
event Destroyed() event Destroyed()
{ {
super.Destroyed(); super.Destroyed();
if (self == GetInstance()) if (self == default.activeInstance)
{ {
OnDestroyed(); OnDestroyed();
default.activeInstance = none;
} }
} }