private void OnEnable() { instance = this; minSize = new Vector2(300, 240); database = DialogueEditorWindow.GetCurrentlyEditedDatabase(); if (database == null) { EditorTools.FindInitialDatabase(); } if (database == null && EditorPrefs.HasKey(DatabaseGUIDPrefsKey)) { var guid = EditorPrefs.GetString(DatabaseGUIDPrefsKey); database = AssetDatabase.LoadAssetAtPath <DialogueDatabase>(guid); } template = TemplateTools.LoadFromEditorPrefs(); if (variableView == null) { variableView = new DialogueEditorVariableView(); } variableView.Initialize(database, template, false); }
private void ResetVariableSection() { variableView = new DialogueEditorVariableView(); variableView.Initialize(database, template, true); }