codewriter-packages / Tri-Inspector

Free inspector attributes for Unity [Custom Editor, Custom Inspector, Inspector Attributes, Attribute Extensions]
MIT License
972 stars 47 forks source link

Unexpected layer enum behavior #171

Open MrCroller opened 2 months ago

MrCroller commented 2 months ago

Unexpected layer enum behavior

Expected behavior When selecting layers in the inspector with parent box fields

Code Sample

[System.Serializable, DeclareFoldoutGroup("Raycaster")]        
public class RaycasterSettings        
{
    [GroupNext("Raycaster")]
    [ShowInInspector, HideReferencePicker] public LayerMask MaskRoomInteract { get; private set; }
    [ShowInInspector, HideReferencePicker] public LayerMask MaskAimInteract { get; private set; }
    [ShowInInspector, HideReferencePicker] public LayerMask MaskAimDistance { get; private set; }
    [ShowInInspector, HideReferencePicker] public float MaxInteractDistance { get; private set; } = 3.1f;
    [ShowInInspector, HideReferencePicker]
    public float MaxAimDistance { get; private set; } = 700f;
}

Screenshots

https://github.com/user-attachments/assets/da2f7075-7613-488b-ab89-5046d990be8c

Desktop: Windows 11 Unity version: 2022.3.14f1 Tri Inspector version: 1.14.1

MrCroller commented 2 months ago

Also, the problem could persist due to parent attributes

[InlineProperty, HideLabel] public RaycasterSettings Raycaster;