UnityEditor.Editor.DrawPropertiesExcluding C# (CSharp) Méthode

DrawPropertiesExcluding() protected static méthode

protected static DrawPropertiesExcluding ( SerializedObject obj ) : void
obj SerializedObject
Résultat void
        protected internal static void DrawPropertiesExcluding(SerializedObject obj, params string[] propertyToExclude)
        {
            SerializedProperty iterator = obj.GetIterator();
            bool enterChildren = true;
            while (iterator.NextVisible(enterChildren))
            {
                enterChildren = false;
                if (!Enumerable.Contains<string>(propertyToExclude, iterator.name))
                {
                    EditorGUILayout.PropertyField(iterator, true, new GUILayoutOption[0]);
                }
            }
        }

Usage Example

Exemple #1
0
 public override void OnInspectorGUI()
 {
     base.serializedObject.Update();
     Editor.DrawPropertiesExcluding(base.serializedObject, new string[0]);
     base.serializedObject.ApplyModifiedProperties();
 }