Exemple #1
0
        public static Vector3 Vector3Field(Rect position, GUIContent content, Vector3 _value, params GUILayoutOption[] options)
        {
            var r = EditorGUI.PrefixLabel(position, content);

            //EditorGUI.DrawRect( , Color.black );
            if (EditorHelper.HasMouseClick(position.W(r.x - EditorGUI.indentLevel * 16), EventMouseButton.R))
            {
                var m = new GenericMenu();
                m.AddItem(SharedModule.S._Copy, (context) => EditorHelper.MenuCopyPos((Vector3)context), _value);
                //m.AddItem( SharedModule.S._Paste, ( context ) => {
                //	//ref Vector3 = (ref Vector3)context;
                //	_value = EditorHelper.GetMenuPastePos();
                //} );
                m.DropDownPopupRect(position);
            }
            return(EditorGUI.Vector3Field(r, "", _value));
        }