Class PreventEditInInspectorAttribute
Prevents the target field from being edited in the inspector window while still maintaining its visiblity
Inheritance
System.Object
System.Attribute
UnityEngine.PropertyAttribute
PreventEditInInspectorAttribute
Implements
System.Runtime.InteropServices._Attribute
Inherited Members
UnityEngine.PropertyAttribute.order
Namespace: Atlas
Assembly: Atlas.Runtime.dll
Syntax
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public sealed class PreventEditInInspectorAttribute : PropertyAttribute, _Attribute
Examples
using UnityEngine;
namespace Atlas.Examples
{
public sealed class Example_PreventEditInInspectorAttribute : MonoBehaviour
{
// field is displayed in inspector, but is greyed out and can't be edited
[SerializeField, PreventEditInInspector] private int m_uneditableField;
}
}
Implements
System.Runtime.InteropServices._Attribute