Exemplo n.º 1
0
        static protected SerializedProperty PropertyField(EditorBase <T> editor, string propName, string label)
        {
            SerializedProperty prop = editor.GetProperty(propName);

            if (prop != null)
            {
                EditorGUILayout.PropertyField(prop, new GUIContent(label, prop.tooltip));
            }
            return(prop);
        }
Exemplo n.º 2
0
        //TODO  Make IncludeChildren an optional parameter, so there aren't so many permutations
        //TODO  Duplicate all remaining PropertyField() methods as RequiredProperty()
        //TODO  Add optional method ShowWarning()
        //TODO  If warning's been set ShowWarning hasn't been called directly, then show it after calling CustomInspector()

        static protected SerializedProperty PropertyField(EditorBase <T> editor, string propName)
        {
            SerializedProperty prop = editor.GetProperty(propName);

            if (prop != null)
            {
                EditorGUILayout.PropertyField(prop);
            }
            return(prop);
        }