mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
Fixed formatting in AtomValueList
This commit is contained in:
parent
db3ed28471
commit
0899d4113d
@ -45,15 +45,15 @@ namespace UnityAtoms
|
||||
protected List<T> list = new List<T>();
|
||||
|
||||
private List<T> _initial;
|
||||
|
||||
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Set of all AtomVariable instances in editor.
|
||||
/// </summary>
|
||||
private static HashSet<AtomValueList<T, E>> _instances = new HashSet<AtomValueList<T, E>>();
|
||||
#endif
|
||||
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
@ -66,7 +66,7 @@ namespace UnityAtoms
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private static void HandlePlayModeStateChange(PlayModeStateChange state)
|
||||
{
|
||||
@ -74,12 +74,12 @@ namespace UnityAtoms
|
||||
{
|
||||
foreach (var instance in _instances)
|
||||
{
|
||||
if(instance._startCleared) instance.list.Clear();
|
||||
if (instance._startCleared) instance.list.Clear();
|
||||
instance._initial = instance.list.ToList();
|
||||
}
|
||||
}
|
||||
else if (state == PlayModeStateChange.EnteredEditMode) // AFTER Playmode stopped
|
||||
{
|
||||
{
|
||||
foreach (var instance in _instances)
|
||||
{
|
||||
instance.list = instance._initial;
|
||||
|
Loading…
Reference in New Issue
Block a user