Add appropriate UNITY_EDITOR compiler flags

This commit is contained in:
Adam Ramberg 2023-08-08 20:23:18 +02:00
parent 50d04f1c9e
commit 14f8f3809c
3 changed files with 6 additions and 0 deletions

View File

@ -80,7 +80,9 @@ namespace UnityAtoms
// Therefore, there might still be null instances, but even though not ideal,
// it should not cause any problems.
// More info: https://issuetracker.unity3d.com/issues/ondisable-and-ondestroy-methods-are-not-called-when-a-scriptableobject-is-deleted-manually-in-project-window
#if UNITY_EDITOR
_instances.Remove(this);
#endif
// Clear all delegates when exiting play mode
UnregisterAll();
}

View File

@ -74,7 +74,9 @@ namespace UnityAtoms
// Therefore, there might still be null instances, but even though not ideal,
// it should not cause any problems.
// More info: https://issuetracker.unity3d.com/issues/ondisable-and-ondestroy-methods-are-not-called-when-a-scriptableobject-is-deleted-manually-in-project-window
#if UNITY_EDITOR
_instances.Remove(this);
#endif
}
#if UNITY_EDITOR

View File

@ -160,7 +160,9 @@ namespace UnityAtoms
// Therefore, there might still be null instances, but even though not ideal,
// it should not cause any problems.
// More info: https://issuetracker.unity3d.com/issues/ondisable-and-ondestroy-methods-are-not-called-when-a-scriptableobject-is-deleted-manually-in-project-window
#if UNITY_EDITOR
_instances.Remove(this);
#endif
}
/// <summary>