EnableForPrefabOnlyAttribute

EnableForPrefabOnly is used on any field or property, and only allows editing of values from prefab assets inspector.

Use this to ensure the same value on a property, across all instances of a prefab.

namespace Sirenix.OdinInspector
{
[ObsoleteAttribute("Use DisableInPrefabInstance or DisableInPrefabAsset instead.", False)]
[AttributeUsageAttribute((AttributeTargets)384, AllowMultiple = False, Inherited = True)]
public class EnableForPrefabOnlyAttribute : Attribute
}

Requirements

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

See Also

Example

The following example shows how EnableForPrefabOnly is used on properties.

public class MyComponent
{
	[EnableForPrefabOnly]
	public int MyInt;
}