Can't use slashes in BoxGroup title

Issue #163 resolved
Jovalent Studios
created an issue

[Error] Group attribute 'BoxGroupAttribute' on member 'RightCamera' expected a group with the name 'Left' to exist in declaring type 'CameraManager'. Its ID was 'Left/Right Camera'.

C:/Users/tor_v/Documents/Projects/Sirenix Development Framework/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyValueEntry.cs:181]

Comments (1)

  1. Tor Esa Vestergaard

    Slashes in group paths are used as group name separators - so what you're doing is trying to put a box group named "Right Camera" into another group named "Left".

    The recommended approach for creating groups with slashes in their names is to use the dynamic string title system:

    private static readonly string CameraBoxGroup = "Left/Right Camera";
    
    [BoxGroup("$CameraBoxGroup")]
    public string someMember1;
    
    [BoxGroup("$CameraBoxGroup")]
    public string someMember2;
    

    We'll make sure to add this to our FAQ in progress.

  2. Log in to comment