SetLocalHandleOffsetScaleDelta() 개인적인 정적인 메소드

private static SetLocalHandleOffsetScaleDelta ( Vector3 scaleDelta, Quaternion pivotRotation ) : void
scaleDelta Vector3
pivotRotation UnityEngine.Quaternion
리턴 void
        public static void SetScaleDelta(Vector3 scaleDelta, Quaternion pivotRotation)
        {
            if (TransformManipulator.s_MouseDownState == null)
            {
                return;
            }
            TransformManipulator.SetLocalHandleOffsetScaleDelta(scaleDelta, pivotRotation);
            for (int i = 0; i < TransformManipulator.s_MouseDownState.Length; i++)
            {
                TransformManipulator.TransformData transformData = TransformManipulator.s_MouseDownState[i];
                Undo.RecordObject(transformData.transform, "Scale");
            }
            Vector3 scalePivot = Tools.handlePosition;

            for (int j = 0; j < TransformManipulator.s_MouseDownState.Length; j++)
            {
                if (Tools.pivotMode == PivotMode.Pivot)
                {
                    scalePivot = TransformManipulator.s_MouseDownState[j].position;
                }
                if (TransformManipulator.individualSpace)
                {
                    pivotRotation = TransformManipulator.s_MouseDownState[j].rotation;
                }
                TransformManipulator.s_MouseDownState[j].SetScaleDelta(scaleDelta, scalePivot, pivotRotation, false);
            }
        }
예제 #2
0
 public static void SetResizeDelta(Vector3 scaleDelta, Vector3 pivotPosition, Quaternion pivotRotation)
 {
     if (TransformManipulator.s_MouseDownState != null)
     {
         TransformManipulator.SetLocalHandleOffsetScaleDelta(scaleDelta, pivotRotation);
         for (int i = 0; i < TransformManipulator.s_MouseDownState.Length; i++)
         {
             TransformManipulator.TransformData transformData = TransformManipulator.s_MouseDownState[i];
             if (transformData.rectTransform != null)
             {
                 Undo.RecordObject(transformData.rectTransform, "Resize");
             }
             else
             {
                 SpriteRenderer component = transformData.transform.GetComponent <SpriteRenderer>();
                 if (component != null && component.drawMode != SpriteDrawMode.Simple)
                 {
                     Undo.RecordObjects(new UnityEngine.Object[]
                     {
                         component,
                         transformData.transform
                     }, "Resize");
                 }
                 else
                 {
                     Undo.RecordObject(transformData.transform, "Resize");
                 }
             }
         }
         for (int j = 0; j < TransformManipulator.s_MouseDownState.Length; j++)
         {
             TransformManipulator.s_MouseDownState[j].SetScaleDelta(scaleDelta, pivotPosition, pivotRotation, true);
         }
     }
 }
 public static void SetResizeDelta(Vector3 scaleDelta, Vector3 pivotPosition, Quaternion pivotRotation)
 {
     if (TransformManipulator.s_MouseDownState != null)
     {
         TransformManipulator.SetLocalHandleOffsetScaleDelta(scaleDelta, pivotRotation);
         for (int i = 0; i < TransformManipulator.s_MouseDownState.Length; i++)
         {
             TransformManipulator.TransformData transformData = TransformManipulator.s_MouseDownState[i];
             Undo.RecordObject((!(transformData.rectTransform != null)) ? transformData.transform : transformData.rectTransform, "Resize");
         }
         for (int j = 0; j < TransformManipulator.s_MouseDownState.Length; j++)
         {
             TransformManipulator.s_MouseDownState[j].SetScaleDelta(scaleDelta, pivotPosition, pivotRotation, true);
         }
     }
 }
예제 #4
0
 public static void SetResizeDelta(Vector3 scaleDelta, Vector3 pivotPosition, Quaternion pivotRotation)
 {
     if (TransformManipulator.s_MouseDownState == null)
     {
         return;
     }
     TransformManipulator.SetLocalHandleOffsetScaleDelta(scaleDelta, pivotRotation);
     for (int index = 0; index < TransformManipulator.s_MouseDownState.Length; ++index)
     {
         TransformManipulator.TransformData transformData = TransformManipulator.s_MouseDownState[index];
         Undo.RecordObject(!((Object)transformData.rectTransform != (Object)null) ? (Object)transformData.transform : (Object)transformData.rectTransform, "Resize");
     }
     for (int index = 0; index < TransformManipulator.s_MouseDownState.Length; ++index)
     {
         TransformManipulator.s_MouseDownState[index].SetScaleDelta(scaleDelta, pivotPosition, pivotRotation, true);
     }
 }