using left button mouse click know how to write this and i have designed my box just need to make a script that can create endless cubes on the terrain.i know it wont be easy for you to explain it to me also i know that there will be a problem with the rigidbody maybe.
just when i ask here i learn fastest thx.
When you say box, you mean literally a cube right?
You say it’s already created and designed. Which I assume means you have a prefab of it. OK, so load up the prefab.
Make sure the prefab is in a folder in the root of your assets called ‘Resources’, now in code say:
GameObject prefab = Resou0rces.Load("myboxprefabname");
Now you have the prefab.
Now you just use Instantiate to make copies.
And then you just move it to some random position. Use Random for that:
y i mean Cube and ive designed its form and material and i dont have a prefab
would appriciate to know what is that and how it works and the links dont work “Page not found”
ummm…
links work for me
you can find all those links by googling:
“unity3d Resources Folder”
“unity3d Instantiate”
“unity3d Random”
If those places can’t help you… you need to TRY HARDER
We don’t do everything for you. Now go research and learn.
oh y opened them i didnt know its for learning thx