Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            tutorial = (GettingStartedTutorial)target;

            EditorGUILayout.LabelField("current tutorial state is: " +
                                       tutorial.TutorialSettings.tutorialState.ToString());
            EditorGUILayout.LabelField("current tutorial step is: " +
                                       tutorial.TutorialSettings.currentTutorialStep.ToString());

            SerializedProperty demoBuildMode = serializedObject.FindProperty("demoBuildMode");

            EditorGUILayout.PropertyField(demoBuildMode);

            if (GUILayout.Button("Restart Tutorial"))
            {
                tutorial.OnRestartTutorial();
            }

            if (GUILayout.Button("Next Step"))
            {
                tutorial.OnButtonNext();
            }

            if (GUILayout.Button("Previous Step"))
            {
                tutorial.OnButtonBack();
            }

            serializedObject.ApplyModifiedProperties();
        }
        public override void Init()
        {
            base.Init();

            if (gestureSettings == null)
            {
                gestureSettings = Utils.GetGestureSettings();
            }
            if (tutorial == null)
            {
                tutorial = GetComponentInParent <GettingStartedTutorial>();
            }
        }