ReadOnly
[ReadOnly]
attribute used mark property as readonly. Property cannot be edited.
Support Types
Any fields
Parameters
No parameters
Examples
[ReadOnly]
public int value;
Note
Make sure that you have added ApexInspector namespace in your script, to get access to all attributes.
using ApexInspector;
Demo
using ApexInspector;
using UnityEngine;
public class ExampleComponent : MonoBehaviour
{
[ReadOnly]
public int value;
}
Live demo