mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
Added disclaimer / comment regarding the solution
This commit is contained in:
parent
adbd7db6c2
commit
fa9e1c8ea1
@ -76,6 +76,10 @@ namespace UnityAtoms
|
|||||||
|
|
||||||
private void OnDisable()
|
private void OnDisable()
|
||||||
{
|
{
|
||||||
|
// NOTE: This will not be called when deleting the Atom from the editor.
|
||||||
|
// 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
|
||||||
_instances.Remove(this);
|
_instances.Remove(this);
|
||||||
// Clear all delegates when exiting play mode
|
// Clear all delegates when exiting play mode
|
||||||
UnregisterAll();
|
UnregisterAll();
|
||||||
|
@ -70,6 +70,10 @@ namespace UnityAtoms
|
|||||||
|
|
||||||
private void OnDisable()
|
private void OnDisable()
|
||||||
{
|
{
|
||||||
|
// NOTE: This will not be called when deleting the Atom from the editor.
|
||||||
|
// 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
|
||||||
_instances.Remove(this);
|
_instances.Remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +156,10 @@ namespace UnityAtoms
|
|||||||
|
|
||||||
private void OnDisable()
|
private void OnDisable()
|
||||||
{
|
{
|
||||||
|
// NOTE: This will not be called when deleting the Atom from the editor.
|
||||||
|
// 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
|
||||||
_instances.Remove(this);
|
_instances.Remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user