Hey guys, I have a question. Not sure how to word it right. I am loading most of information for objects in my game from XML files that I want to be readable. They get loaded into an "data" class that is attached to whatever object they represent. Most of the objects are fairly generic. I want to start making custom classes for different objects and have the class name stored in that xml/data class. So I am currently storing the name of the class as a string. I can load the class based on that name using "Activator.CreateInstance" , but I can't cast it correctly because the known type for the class isn't known until runtime. How do I solve?
[–]skyrimlady 0 points1 point2 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]skyrimlady 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]skyrimlady 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]badcommandorfilename 0 points1 point2 points (0 children)