A: The Problem
- I have an array of values formated as such [1,0,5,1,7,1,1,0…]
- I have a series of custom classes named Tile0, Tile1, Tile2…
- I have a var classString that is a concatenation of the string “Tile” with whatever value I am pulling from the index.
- I wish to instantiate one of the classes from 2) with the dynamically created string in 3)
B: Tested Solutions
- If I hard code the class names from A:2 they instantiate correctly, so I know they are working
- The problem is strictly related to instantiating a class from a variable
- I did a search here last night and returned one thread on the subject (link), but was not able to successfully implement that technique do to lack of details.
Does anyone know how to do this??