Пример #1
0
 private void Inspector()
 {
     Utility.SetGUIColor(UltiDraw.Grey);
     using (new EditorGUILayout.VerticalScope("Box")) {
         Utility.ResetGUIColor();
         Target.NewSkeleton = (GameObject)EditorGUILayout.ObjectField("Skeleton", Target.NewSkeleton, typeof(GameObject), true);
         Target.BendRange   = EditorGUILayout.FloatField("Bend Range", Target.BendRange);
         Target.BendFactor  = EditorGUILayout.FloatField("Bend Factor", Target.BendFactor);
         if (Utility.GUIButton("Process", UltiDraw.DarkGrey, UltiDraw.White))
         {
             Target.Process();
         }
     }
 }
Пример #2
0
        public override void OnInspectorGUI()
        {
            Undo.RecordObject(Target, Target.name);

            DrawDefaultInspector();
            if (GUILayout.Button("Process"))
            {
                Target.Process();
            }

            if (GUI.changed)
            {
                EditorUtility.SetDirty(Target);
            }
        }