- Home /
prefab created into an array
I'm trying to make a board game creation API. I can create prefabs, and that works fine, but I can't figure out how to get them to create, and then be added to an array. I've tried resources.load, I've tried gameObject.find, and neither is working. Does anyone know how to accomplish this?
Comment
Best Answer
Answer by Landern · Jun 23, 2014 at 05:38 PM
Make a script
1 Create a public variable for the prefab(s).
2 Create a List of GameObject or List Transform. #3 On start, Use Instantiate to create and assign new clones of #1 #4 Use a loop on 4 to create n amount. #5 Profit.
Landern, I could kiss you. I still have no idea what you meant, but it did give me enough push to figure it out. Thank you!
Your answer