Fixed formatting in AtomValueList

This commit is contained in:
Adam Ramberg 2023-08-03 23:30:17 +02:00
parent db3ed28471
commit 0899d4113d

View File

@ -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;