- changed status to closed
Support for tuple variable names in inspector
Issue #826
closed
I have the following that shows in the inspector:
[SerializeField] public List<(CollectionSO Collection, float Weight)> CollectionSOs = new List<(CollectionSO Collection, float Weight)>();
The value type tuple has two variables that are named, (Collection and Weight), however the inspector just shows them as item1 and item2
I’ve attached a screenshot showing this
Odin 3.0.12.0, Unity 2020.3.24f1, Windows 10
Comments (1)
-
- Log in to comment
Named tuples are largely syntactic sugar, the compiler doesn't use the names you set for them, but rather Item1, Item2, ... Obtaining this information is very difficult and often simply impossible. I’d sugest to create classes/structs instead.