Ejemplo n.º 1
0
        public static void ApplyProperties(ShapeComponent shape, Vector3 newCenterPosition, Vector3 newSize)
        {
            var bounds = new Bounds();

            bounds.center = newCenterPosition;
            bounds.size   = newSize;

            UndoUtility.RecordComponents <Transform, ProBuilderMesh, ShapeComponent>(shape.GetComponents(typeof(Component)), "Resize Shape");
            shape.UpdateBounds(bounds);

            ProBuilderEditor.Refresh(false);
        }