- Home /
pre populate nullable type list items in inspector
so when one has a list like public List <ShopItem> shopItems;
where [System.Serializable] public class ShopItem
is some custom class and then one looks at the list in the inspector and adds a list item in the inspector, it automatically populates that list item with an instance of the ShopItem class, that's nice. But when one makes the ShopItem class inherit from Object (to make it nullable and check if it's null) and then adds an item to the shopItems list in the inspector, it is not populated by itself.
So is there a way to have it populate the new item automatically in the list in the inspector for nullable types?
Not sure what you mean exactly, all classes are nullable, structs however are not.
Your answer
Follow this Question
Related Questions
Serialization of list in list problem with depth 0 Answers
How do I retrieve an item from a list? 1 Answer
Is it possible to choose from preinitialized lists in the inspector? 1 Answer
Creating a custom inspector utilizing a list of class instances with serialization? 1 Answer
Methods list in inspector 0 Answers