Ejemplo n.º 1
0
 /// <summary>
 /// Displays the linear limit handle property editor.
 /// </summary>
 public static void DisplayLinearLimitHandlePropertyEditor()
 {
     EditorGUI.BeginChangeCheck();
     {
         s_LinearLimitHandlePreference.CurrentValue =
             EditorGUIX.DisplayOnOffToggle("Linear Limit Handle", s_LinearLimitHandlePreference.CurrentValue);
     }
     if (EditorGUI.EndChangeCheck())
     {
         SceneView.RepaintAll();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Displays the handle preferences. They will be displayed in the preference menu and the top of the inspector.
 /// </summary>
 new protected static void DisplayHandlePreferences()
 {
     EditorGUI.BeginChangeCheck();
     {
         s_OverrideBuiltinEditors.CurrentValue = EditorGUIX.DisplayOnOffToggle(
             "Override Builtin Joint Editors", s_OverrideBuiltinEditors.CurrentValue
             );
     }
     if (EditorGUI.EndChangeCheck())
     {
         UnityFeatureDefineSymbols.SetSymbolForAllBuildTargets(
             s_OverrideBuiltinEditorSymbol, g => s_OverrideBuiltinEditors.CurrentValue
             );
     }
     DisplaySceneGUIHandlePreferences();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Displays the scene GUI handle toggles. This group appears at the top of the scene GUI overlay.
 /// </summary>
 protected override void DisplaySceneGUIHandleToggles()
 {
     base.DisplaySceneGUIHandleToggles();
     if (this.ImplementsLinearLimits)
     {
         AreLinearLimitHandlesEnabled =
             EditorGUIX.DisplayOnOffToggle("Linear Limit Handle", AreLinearLimitHandlesEnabled);
     }
     if (this.ImplementsAngularLimits)
     {
         AreAngularLimitHandlesEnabled = EditorGUIX.DisplayOnOffToggle(
             "Angular Limit Handle", AreAngularLimitHandlesEnabled
             );
         AreAxisHandlesEnabled =
             EditorGUIX.DisplayOnOffToggle("Axis Handle", AreAxisHandlesEnabled);
     }
     if (this.ImplementsAnchor)
     {
         AreAnchorHandlesEnabled =
             EditorGUIX.DisplayOnOffToggle("Anchor Handle", AreAnchorHandlesEnabled);
     }
 }