UnityEditor.Joint2DEditorBase.HandleAnchor C# (CSharp) Method

HandleAnchor() protected method

protected HandleAnchor ( Vector3 &position, bool isConnectedAnchor ) : bool
position Vector3
isConnectedAnchor bool
return bool
        protected bool HandleAnchor(ref Vector3 position, bool isConnectedAnchor)
        {
            if (s_Styles == null)
            {
                s_Styles = new 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();
        }