Shimizoki
❔ [Unity?] How to have a list of generic classes in inspector cast as derived class
I have some classes as follows:
In my main script I am attempting to have a list of Tracked Markers in the inspector, But if I initialize my list as
Then when I try and cast it later, I get the expected
I somewhat understand why… If it was stored in the baseClass list, it would not know which child it belongs to. However in unity the objects that I am slotting in are already the derived class… so it should be available.
78 replies