Skip to content

ReadOnly doesn't work with InlineEditor #154

@PascalRuiz

Description

@PascalRuiz

Describe the bug
A serialized property in a class with the [ReadOnly] attribute becomes editable when it is declared with the [InlineEditor]

Expected behavior

The [ReadOnly] attribute must be active for all time.
Code Sample

// 

[Serializable]
public class Data
{
  [SerializedField,ReadOnly]
  private float a; // a is not editable in inspector here :)
}
public class Test : MonoBehaviour
{
  [SerializedField,InlineEditor]
  private Data data; // data.a become editable in inspector here :(
}

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

**Desktop:** <!-- e.g. Windows 11 -->
**Unity version:** <!-- e.g. 2021.3.33f1 -->
**Tri Inspector version:** <!-- e.g. 1.13.2 -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions