OnEnable() public method

public OnEnable ( UnityEditor.SerializedProperty m_Rotation, GUIContent label ) : void
m_Rotation UnityEditor.SerializedProperty
label UnityEngine.GUIContent
return void
示例#1
0
        public void OnEnable()
        {
            m_Position = serializedObject.FindProperty("m_LocalPosition");
            m_Scale    = serializedObject.FindProperty("m_LocalScale");

            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."));
        }