void Init() { if (m_Initialized) { return; } m_Initialized = true; if (File.Exists(path)) { m_Dictionary = null; m_cachedJson = File.ReadAllText(path); EditorJsonUtility.FromJsonOverwrite(m_cachedJson, this); if (m_Dictionary == null) { m_Dictionary = new SettingsDictionary(); } } }
void Init() { if (m_Initialized) { return; } m_Initialized = true; if (TryLoadSavedJson(out string json)) { m_Dictionary = null; m_JsonHash = Hash128.Compute(json); EditorJsonUtility.FromJsonOverwrite(json, this); } if (m_Dictionary == null) { m_Dictionary = new SettingsDictionary(); } }
private void Initialize() { if (_initialized) { return; } _initialized = true; if (File.Exists(path)) { _dictionary = null; _cachedJson = File.ReadAllText(path); EditorJsonUtility.FromJsonOverwrite(_cachedJson, this); if (_dictionary == null) { _dictionary = new SettingsDictionary(); } } }