protected bool HandleAnchor(ref Vector3 position, bool isConnectedAnchor) { if (Joint2DEditorBase.s_Styles == null) { Joint2DEditorBase.s_Styles = new Joint2DEditorBase.Styles(); } Handles.DrawCapFunction drawFunc = (!isConnectedAnchor) ? new Handles.DrawCapFunction(Joint2DEditorBase.AnchorCap) : new Handles.DrawCapFunction(Joint2DEditorBase.ConnectedAnchorCap); int id = this.target.GetInstanceID() + ((!isConnectedAnchor) ? 0 : 1); EditorGUI.BeginChangeCheck(); position = Handles.Slider2D(id, position, Vector3.back, Vector3.right, Vector3.up, 0f, drawFunc, Vector2.zero); return EditorGUI.EndChangeCheck(); }
protected bool HandleAnchor(ref Vector3 position, bool isConnectedAnchor) { if (Joint2DEditorBase.s_Styles == null) { Joint2DEditorBase.s_Styles = new Joint2DEditorBase.Styles(); } Handles.DrawCapFunction drawFunc = (!isConnectedAnchor) ? new Handles.DrawCapFunction(Joint2DEditorBase.AnchorCap) : new Handles.DrawCapFunction(Joint2DEditorBase.ConnectedAnchorCap); int id = this.target.GetInstanceID() + ((!isConnectedAnchor) ? 0 : 1); EditorGUI.BeginChangeCheck(); position = Handles.Slider2D(id, position, Vector3.back, Vector3.right, Vector3.up, 0f, drawFunc, Vector2.zero); return(EditorGUI.EndChangeCheck()); }