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
-
objectAttributePropertyAttributeReadOnlyAttribute
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.