FoldoutGroupAttribute

FoldoutGroup is used on any property, and organizes properties into a foldout.

Use this to organize properties, and to allow the user to hide properties that are not relevant for them at the moment.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)448, AllowMultiple = True, Inherited = True)]
public class FoldoutGroupAttribute : PropertyGroupAttribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.5.0

See Also

Constructors

Definition Description
FoldoutGroupAttribute(string, bool, int) Adds the property to the specified foldout group.
FoldoutGroupAttribute(string, int) Adds the property to the specified foldout group.
FoldoutGroupAttribute(string, string, int) Adds the property to the specified foldout group.

Properties

Return Type Definition Description
bool Expanded Gets a value indicating whether or not the foldout should be expanded by default..
bool HasDefinedExpanded Gets a value indicating whether or not the Expanded property has been set.
string TitleStringMemberName Name of any string field, property or function, to title the foldout in the inspector.

Methods

Return Type Definition Description
void CombineValuesWith(PropertyGroupAttribute) Combines the foldout property with another.

Example

The following example shows how FoldoutGroup is used to organize properties into a foldout.

public class MyComponent : MonoBehaviour
{
	[FoldoutGroup("MyGroup")]
	public int A;

	[FoldoutGroup("MyGroup")]
	public int B;

	[FoldoutGroup("MyGroup")]
	public int C;
}

Example

The following example shows how properties can be organizes into multiple foldouts.

public class MyComponent : MonoBehaviour
{
	[FoldoutGroup("First")]
	public int A;

	[FoldoutGroup("First")]
	public int B;

	[FoldoutGroup("Second")]
	public int C;
}