I’ve an summary class, name it FooClass. And there are two courses that inherit from it. name’em BazClass and DazClass. I need to create cases of BazClass and DazClass at runtime.
On the similar I’ve scriptableObject (SO). I need to retailer a variable inside every ScriptableObject which refers back to the kind of BazClass or DazClass (To not an occasion of BazClass or DazClass).
- Can I’ve a variable that takes Varieties inherited from one other class.
Forexample like;
utilizing System;
Sort<:T> variableName the place T is FooClass; //shops a sort that inherits from FooClass.
- How can I visualise this variable within the Unity inspector?