Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            var profile = m_Profile.objectReferenceValue as WXPostProcessProfile;

            InitEditor(profile);
            EditorGUILayout.PropertyField(m_Profile);
            Rect lastRect   = GUILayoutUtility.GetLastRect();
            var  buttonRect = new Rect(lastRect.x + 60, lastRect.y, 45, 18);

            if (GUI.Button(buttonRect, new GUIContent("New")))
            {
                profile = CreateProfile();
                m_Profile.objectReferenceValue = profile;
            }
            else if (profile != null && editor != null)
            {
                editor.OnGUI();
            }
            serializedObject.ApplyModifiedProperties();
        }
 public override void OnInspectorGUI()
 {
     editor.OnGUI();
 }