Tri-Inspector icon indicating copy to clipboard operation
Tri-Inspector copied to clipboard

Header is not rendered before the collection

Open xk0fe opened this issue 10 months ago • 1 comments

Describe the bug [Header] attribute does nothing when placed before collection that is drawn with Tri Inspector

Expected behavior Header is displayed before the collection

Code Sample

public class TriTest : MonoBehaviour
{
    [Header("Header 1")]
    [SerializeField, DrawWithUnity] private List<Item> _unityItems;
    [Header("Header 2")]
    [SerializeField] private List<Item> _triItems;
    [Header("Header 3")]
    [SerializeField, DrawWithUnity] private Item[] _unityItemsArray;
    [Header("Header 4")]
    [SerializeField] private Item[] _triItemsArray;
}

[Serializable]
public class Item
{
    [Header("Header 1")]
    [SerializeField] private List<AnotherItem> _items;
    [Header("Header 2")]
    [SerializeField] private string _name;
    [Header("Header 3")]
    [SerializeField] private int _value;
}

[Serializable]
public class AnotherItem
{
    [SerializeField] private string _value;
}

Screenshots

Image

Desktop: Windows 10 Unity version: 2023.2.5 Tri Inspector version: 1.14.1

xk0fe avatar Jan 18 '25 02:01 xk0fe

The Тitle attribute is a unity built-in attribute and only works for the default inspector. For Tri Inspector you can use the Title attribute instead.

vanifatovvlad avatar Mar 19 '25 10:03 vanifatovvlad