- Home /
Question by
spoonshoe · Jun 03, 2018 at 03:02 PM ·
scripting problemclassgenericstypeof
Pass Class as a generic type using string
There are lots of variations on this question but I can't seem to find this very specific case. I'm trying to get the class from a string (which works) and then pass that into a method as a generic.
The error I'm getting 'Is a variable but is used like a type'.
Type bookType = Type.GetType("Book");
LoadDD<bookType>(dd, GameData.inst.bookList);
Comment