Version 2.1.0.0

PropertyChildren class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public sealed class PropertyChildren : IEnumerable<InspectorProperty>, IEnumerable
Represents the children of an InspectorProperty.
Inheritance
  • System.Object
  • PropertyChildren

Properties

Count
The number of children on the property.
public int Count { get; }
Item[Int32]
Gets a child by index. This is an alias for Get(Int32).
public InspectorProperty this[int index] { get; }
Parameters
System.Int32 index

The index of the child to get.

Item[String]
Gets a child by name. This is an alias for Get(String).
public InspectorProperty this[string name] { get; }
Parameters
System.String name

The name of the child to get.

Methods

Get(Int32)
Gets a child by index.
public InspectorProperty Get(int index)
Parameters
System.Int32 index

The index of the child to get.

Returns
InspectorProperty

The child at the given index.

Exceptions
System.IndexOutOfRangeException

The given index was out of range.

Get(String)
Gets a child by name.
public InspectorProperty Get(string name)
Parameters
System.String name

The name of the child to get.

Returns
InspectorProperty

The child, if a child was found; otherwise, null.

Exceptions
System.ArgumentNullException

name

GetEnumerator()
Gets the enumerator.
public IEnumerator<InspectorProperty> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<InspectorProperty>

GetPath(Int32)
Gets the path of the child at a given index.
public string GetPath(int index)
Parameters
System.Int32 index

The index to get the path of.

Returns
System.String

The path of the child at the given index.

Exceptions
System.IndexOutOfRangeException

The given index was out of range.

Recurse()
Returns an IEnumerable that recursively yields all children of the property, depth first.
public IEnumerable<InspectorProperty> Recurse()
Returns
System.Collections.Generic.IEnumerable<InspectorProperty>

Update()
Updates this instance of PropertyChildren.
public void Update()
Extension Methods

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.