Button Script
I'm fairly new to unity and i was wondering what script i would use for spawning units. I'm making a cartoon wars like game where you click a button (for some type of unit) and it spawns that unit. If anyone could help me out, that would be great.
I suspect you will want to use "Prefabs" for your units. Check out this link re: adding them to a scene at runtime. Let us know if questions remain after reading it
https://docs.unity3d.com/$$anonymous$$anual/InstantiatingPrefabs.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612110850im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
NetworkServer.Spawn() make client crash to desktop when called in a loop 1 Answer
Check if there's no GameObject with specific tag in the field (in the camera view) 0 Answers
How to make Object X spawn when there're no more Objects tagged "XYZ" in scene? 1 Answer
spawn in specific areas only 0 Answers