Let me try to explain!
Basically in the system that I’m doing, I would like to:
1- System(my main class) - List<Tools> ToolsList;
| tool01(child class)
2- Tools(parent class)--| tool02(child class)
So when i drag new tools in the list, i want to expose to use that child classes functions.Is it possible, or correct?
p.s:The tool01, too02 … are prefabs.
You can access any method that is defined in the Tool class or its base classes, and if the extending class i.e. Tool1 overrides that method, the overriding method will get executed.
You can not call any methods that are only defined in the extending class i.e. Tool1 unless you cast the tool to the type that defines the method. This will of course throw an error if you try to cast a Tool2 into a Tool1, so you have to know what you are referencing.