Hello, I have a problem. I don’t know how to spawn specific Game Object without fill them on inspector. I mean, the game object already written inside script when declare an object. My Asset is inside Materials folder.
Read this through.
Even if you don’t want to use Prefab for this. There is this ‘Building a wall’ example where you can see how to create GO and add components to it.
I’ve already read that page. It’s not what I mean. I want to fill GameObject with an avaiable asset without fill it manually on inspector
I am find how to get GameObject manually, using GameObhect.Find. But this method doesn’t work to Asset
What is your asset? Is it a material you want to add to a gameObject? You have to store it in a Resources folder and load it from there.
1 Like
Ah that’s works! my asset is primitive sphere with .prefab extension. I did this because I am curious.