Save IsExpanded to SessionState by PropertyPath

This commit is contained in:
VladV 2023-04-06 14:35:01 +04:00
parent df34309dc1
commit d35a28ba20

View File

@ -237,10 +237,10 @@ namespace TriInspector
if (_isExpandedPrefsKey == null)
{
_isExpandedPrefsKey = $"TriInspector.expanded.{PropertyTree.TargetObjectType}.{RawName}";
_isExpandedPrefsKey = $"TriInspector.expanded.{PropertyPath}";
}
return EditorPrefs.GetBool(_isExpandedPrefsKey, false);
return SessionState.GetBool(_isExpandedPrefsKey, false);
}
set
{
@ -255,7 +255,7 @@ namespace TriInspector
}
else if (_isExpandedPrefsKey != null)
{
EditorPrefs.SetBool(_isExpandedPrefsKey, value);
SessionState.SetBool(_isExpandedPrefsKey, value);
}
}
}