Hi, im trying to convert a Component to its actual System.Type. Ive tried a number of things, but cant find the proper way to do this. I thot this would work, but doesnt
print(com.GetType());//Prints the actual type
var childCom=GetComponentsInChildren.<com.GetType()>(); //This throws syntax error
i also tried storing the GetType() return in a variable typed as System.Type, but that throws an error that myVariable does not denote a valid type.
Kinda stuck on this one, your help is much appreciated.
Thanks in advance