Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            MeshGenerator generator = (MeshGenerator)target;

            if (generator.baked)
            {
                GUILayout.Label("BAKED. DOES NOT UPDATE.");
                if (GUILayout.Button("Revert Bake"))
                {
                    generator.Unbake();
                    EditorUtility.SetDirty(target);
                }
                return;
            }
            EditorGUI.BeginChangeCheck();
            BaseGUI();
            ShowInfo();
            if (GUILayout.Button("Bake Mesh"))
            {
                bakeWindow = EditorWindow.GetWindow <BakeMeshWindow>();
                bakeWindow.Init(generator);
            }
            if (EditorGUI.EndChangeCheck())
            {
                EditorUtility.SetDirty(target);
            }
        }
Esempio n. 2
0
        public override void OnInspectorGUI()
        {
            MeshGenerator generator = (MeshGenerator)target;

            if (generator.baked)
            {
                if (SplineEditorGUI.EditorLayoutSelectableButton(new GUIContent("Revert Bake", "Makes the mesh dynamic again and allows editing"), true, true))
                {
                    generator.Unbake();
                    EditorUtility.SetDirty(target);
                }
                return;
            }
            base.OnInspectorGUI();
        }