예제 #1
0
        protected override void OnSettingsGUI()
        {
            GUILayout.Label("Hotspot Settings", EditorStyles.boldLabel);

            EditorGUI.BeginChangeCheck();
            target = (HotspotTexture)EditorGUILayout.ObjectField(target, typeof(HotspotTexture), false);
            if (EditorGUI.EndChangeCheck())
            {
                SessionState.SetInt("hostpot-uv-target-id", target.GetInstanceID());
            }

            EditorGUILayout.Space();

            GUILayout.Label("Rotate", EditorStyles.boldLabel);

            using (new EditorGUILayout.HorizontalScope())
            {
                if (GUILayout.Button("-45"))
                {
                    RotateUV(-45);
                }
                if (GUILayout.Button("+45"))
                {
                    RotateUV(45);
                }
            }
            using (new EditorGUILayout.HorizontalScope())
            {
                if (GUILayout.Button("-90"))
                {
                    RotateUV(-90);
                }
                if (GUILayout.Button("+90"))
                {
                    RotateUV(90);
                }
            }

            GUILayout.Label("Flip", EditorStyles.boldLabel);

            using (new EditorGUILayout.HorizontalScope())
            {
                if (GUILayout.Button("X"))
                {
                    FlipUV(Vector2.right);
                }
                if (GUILayout.Button("Y"))
                {
                    FlipUV(Vector2.up);
                }
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Hotspot selection"))
            {
                PerformAction();
            }
        }
        protected override void OnSettingsGUI()
        {
            GUILayout.Label("Hotspot Settings", EditorStyles.boldLabel);

            EditorGUI.BeginChangeCheck();
            target = (HotspotTexture)EditorGUILayout.ObjectField(target, typeof(HotspotTexture), false);
            if (EditorGUI.EndChangeCheck())
            {
                SessionState.SetInt("hostpot-uv-target-id", target.GetInstanceID());
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Hotspot selection"))
            {
                DoAction();
            }
        }