Exemplo n.º 1
0
        public static Cutscene CutsceneGUI(string label, Cutscene cutscene)
        {
            EditorGUILayout.BeginHorizontal();
            cutscene = (Cutscene)EditorGUILayout.ObjectField(label, cutscene, typeof(Cutscene), true);

            if (cutscene == null)
            {
                if (GUILayout.Button("Create", GUILayout.MaxWidth(60f)))
                {
                    cutscene = SceneManager.AddPrefab("Logic", "Cutscene", true, false, true).GetComponent <Cutscene>();
                    cutscene.Initialise();
                }
            }

            EditorGUILayout.EndHorizontal();
            return(cutscene);
        }
Exemplo n.º 2
0
        public static Cutscene CutsceneGUI(string label, Cutscene cutscene, string defaultName = "", string api = "", string tooltip = "")
        {
            EditorGUILayout.BeginHorizontal();
            cutscene = (Cutscene)CustomGUILayout.ObjectField <Cutscene> (label, cutscene, true, api, tooltip);

            if (cutscene == null)
            {
                if (GUILayout.Button("Create", GUILayout.MaxWidth(60f)))
                {
                    cutscene = SceneManager.AddPrefab("Logic", "Cutscene", true, false, true).GetComponent <Cutscene>();
                    cutscene.Initialise();

                    if (!string.IsNullOrEmpty(defaultName))
                    {
                        cutscene.gameObject.name = AdvGame.UniqueName(defaultName);
                    }
                }
            }

            EditorGUILayout.EndHorizontal();
            return(cutscene);
        }
Exemplo n.º 3
0
        public static Cutscene CutsceneGUI(string label, Cutscene cutscene)
        {
            EditorGUILayout.BeginHorizontal ();
            cutscene = (Cutscene) EditorGUILayout.ObjectField (label, cutscene, typeof (Cutscene), true);

            if (cutscene == null)
            {
                if (GUILayout.Button ("Create", GUILayout.MaxWidth (60f)))
                {
                    cutscene = SceneManager.AddPrefab ("Logic", "Cutscene", true, false, true).GetComponent <Cutscene>();
                    cutscene.Initialise ();
                }
            }

            EditorGUILayout.EndHorizontal ();
            return cutscene;
        }