Table of Contents

Class ReadOnlyAttribute

Namespace
Plugins.Saneject.Runtime.Attributes
Assembly
Saneject.Runtime.dll

Marks a field as read-only in the Unity inspector.

[AttributeUsage(AttributeTargets.Field)]
public class ReadOnlyAttribute : PropertyAttribute
Inheritance
object
Attribute
PropertyAttribute
ReadOnlyAttribute

Remarks

When applied to a serialized field, this attribute causes the field to appear grayed out and disabled in the inspector. Saneject automatically draws InjectAttribute fields as read-only, but you can use this attribute independently on non-injected fields.