public void OnEnable()
 {
   this.m_Position = this.serializedObject.FindProperty("m_LocalPosition");
   this.m_Scale = this.serializedObject.FindProperty("m_LocalScale");
   if (this.m_RotationGUI == null)
     this.m_RotationGUI = new TransformRotationGUI();
   this.m_RotationGUI.OnEnable(this.serializedObject.FindProperty("m_LocalRotation"), new GUIContent(LocalizationDatabase.GetLocalizedString("Rotation")));
 }
 public void OnEnable()
 {
     this.m_Position = this.serializedObject.FindProperty("m_LocalPosition");
     this.m_Scale    = this.serializedObject.FindProperty("m_LocalScale");
     if (this.m_RotationGUI == null)
     {
         this.m_RotationGUI = new TransformRotationGUI();
     }
     this.m_RotationGUI.OnEnable(this.serializedObject.FindProperty("m_LocalRotation"), new GUIContent(LocalizationDatabase.GetLocalizedString("Rotation")));
 }
 public void OnEnable()
 {
     this.m_Position = base.serializedObject.FindProperty("m_LocalPosition");
     this.m_Scale    = base.serializedObject.FindProperty("m_LocalScale");
     if (this.m_RotationGUI == null)
     {
         this.m_RotationGUI = new TransformRotationGUI();
     }
     this.m_RotationGUI.OnEnable(base.serializedObject.FindProperty("m_LocalRotation"), EditorGUIUtility.TrTextContent("Rotation", "The local rotation of this GameObject relative to the parent.", null));
 }
		public void OnEnable()
		{
			this.m_Position = base.serializedObject.FindProperty("m_LocalPosition");
			this.m_Scale = base.serializedObject.FindProperty("m_LocalScale");
			if (this.m_RotationGUI == null)
			{
				this.m_RotationGUI = new TransformRotationGUI();
			}
			this.m_RotationGUI.OnEnable(base.serializedObject.FindProperty("m_LocalRotation"), new GUIContent("Rotation"));
		}
Example #5
0
        public void OnEnable()
        {
            m_Position = serializedObject.FindProperty("m_LocalPosition");
            m_Scale    = serializedObject.FindProperty("m_LocalScale");
            m_ConstrainProportionsScaleProperty = serializedObject.FindProperty("m_ConstrainProportionsScale");

            if (m_RotationGUI == null)
            {
                m_RotationGUI = new TransformRotationGUI();
            }
            m_RotationGUI.OnEnable(serializedObject.FindProperty("m_LocalRotation"), EditorGUIUtility.TrTextContent("Rotation", "The local rotation of this GameObject relative to the parent."));
            m_ConstrainProportionsScale = new ConstrainProportionsTransformScale(m_Scale.vector3Value);
        }
		private void OnEnable()
		{
			this.m_AnchorMin = base.serializedObject.FindProperty("m_AnchorMin");
			this.m_AnchorMax = base.serializedObject.FindProperty("m_AnchorMax");
			this.m_AnchoredPosition = base.serializedObject.FindProperty("m_AnchoredPosition");
			this.m_SizeDelta = base.serializedObject.FindProperty("m_SizeDelta");
			this.m_Pivot = base.serializedObject.FindProperty("m_Pivot");
			this.m_TargetCount = base.targets.Length;
			this.m_LocalPositionZ = base.serializedObject.FindProperty("m_LocalPosition.z");
			this.m_LocalScale = base.serializedObject.FindProperty("m_LocalScale");
			if (this.m_RotationGUI == null)
			{
				this.m_RotationGUI = new TransformRotationGUI();
			}
			this.m_RotationGUI.OnEnable(base.serializedObject.FindProperty("m_LocalRotation"), new GUIContent("Rotation"));
			this.m_ShowLayoutOptions = EditorPrefs.GetBool("RectTransformEditor.showAnchorProperties", false);
			this.m_RawEditMode = EditorPrefs.GetBool("RectTransformEditor.lockRect", false);
			this.m_ChangingAnchors.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingPivot.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingWidth.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingHeight.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingPosX.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingPosY.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingLeft.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingRight.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingTop.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			this.m_ChangingBottom.valueChanged.AddListener(new UnityAction(this.RepaintScene));
			ManipulationToolUtility.handleDragChange = (ManipulationToolUtility.HandleDragChange)Delegate.Combine(ManipulationToolUtility.handleDragChange, new ManipulationToolUtility.HandleDragChange(this.HandleDragChange));
		}