Beispiel #1
0
        private void RenderShapeTypeSelectionPopup()
        {
            ObjectPivotPointShapeType newShapeType = (ObjectPivotPointShapeType)EditorGUILayout.EnumPopup(GetContentForShapeTypeSelectionPopup(), _settings.ShapeType);

            if (newShapeType != _settings.ShapeType)
            {
                UndoEx.RecordForToolAction(_settings);
                _settings.ShapeType = newShapeType;

                SceneView.RepaintAll();
            }
        }
        public static IPivotPointRenderer Create(ObjectPivotPointShapeType pivotPointShapeType)
        {
            switch (pivotPointShapeType)
            {
            case ObjectPivotPointShapeType.Circle:

                return(new CirclePivotPointRenderer());

            case ObjectPivotPointShapeType.Square:

                return(new SquarePivotPointRenderer());

            default:

                return(null);
            }
        }