public static void CreateDialogue() { DialogueHolder asset = ScriptableObject.CreateInstance <DialogueHolder>(); AssetDatabase.CreateAsset(asset, "Assets/NewDialogue.asset"); AssetDatabase.SaveAssets(); }
void RefreshSelectedDialogue() { if (Selection.activeObject != null) { selectedGameObject = Selection.activeObject; if (selectedGameObject is DialogueHolder) { currentDialogue = (DialogueHolder)selectedGameObject; } else { currentDialogue = null; } } }