Пример #1
0
        public static void CreateDialogue()
        {
            DialogueHolder asset = ScriptableObject.CreateInstance <DialogueHolder>();

            AssetDatabase.CreateAsset(asset, "Assets/NewDialogue.asset");
            AssetDatabase.SaveAssets();
        }
Пример #2
0
 void RefreshSelectedDialogue()
 {
     if (Selection.activeObject != null)
     {
         selectedGameObject = Selection.activeObject;
         if (selectedGameObject is DialogueHolder)
         {
             currentDialogue = (DialogueHolder)selectedGameObject;
         }
         else
         {
             currentDialogue = null;
         }
     }
 }