- Home /
Question by
Hawkiee · Aug 21, 2017 at 07:29 AM ·
instantiateclassinstances
Instance of the class represented by Game Object
Hello, I was wondering what is the best option to connect game object with the instance of the class? I'm trying to make a simple turn based strategy RPG. I have the list of Hero class instances created by a player the next thing is I instantiate cubs as prototypes in each/scene level to represent the heroes. How do I connect the instances of the Hero class with spawned gameobjects ?
Comment
Set a GameObject variable in the hero class, and in its constructor pass the gameobject and set it?