private static void LoadFromJson()
        {
            preferences = ScriptableObject.CreateInstance <HierarchyPreferences>();
            var json = EditorPrefs.GetString(PreferencePath);

            EditorJsonUtility.FromJsonOverwrite(json, preferences);
        }
Esempio n. 2
0
 private static void LoadIfNeeded()
 {
     if (preferences != null)
     {
         return;
     }
     preferences = ScriptableObject.CreateInstance <HierarchyPreferences>();
     LoadFromJson();
 }