C#C
C#3y ago
eimiieee

Accessing a table in a list of subclasses (unity)

Hello, i'm trying to change a value of a table during runtime.
I have a unity object called manager that is the main, which in turn contains a class called unit, unit contains a list with costumes, along with all the options in a table, where of inside there is a simple bool which i'd like to change from ALLOWED to DISABLED and vice versa, however when i try to access this during runtime it tells me that the object I try access doesn't exit even if i know it's there and, simplified it's something like this

var example = Manager.unit.costumeMap[0];
                    example.costumeTable.usingType = Manager.costumeTable.USING_TYPE.ALLOWED;


What I doing wrong?
Was this page helpful?