Is there a stream-lined way to call Prefabs/GameObjects from within your scripts? I find linking stuff in the unity GUI is very tedious. For instance, if I have 20+ enemies I don’t want to click each of them into an array for a script.
1) For scripts how to programmatically (without linking) get Prefabs found in “/Assets/Prefabs”
2) For scripts is Find(“…”) the best way to get live GameObjects?
Just done something like this less than an hour ago on my project.
I used Resources.Load(PREFABNAME) as the first parameter of the Instantiate() function.
For this to work you will need to create a new folder called Resources (you can have multiple of these in your project) and place your enemy prefab inside it.
Mine was for bulletholes, so my folder structure went “Assets/Prefabs/Misc/Resources/BulletHole_Template.prefab”
Hope this helps.