So i am totaly new at unity. But i know coding basics. I just dont know hot to interact with the objects here.
I want to make a Project. So lets say if you draw a wall with the cursor(3d), a worker comes and build the wall, how do i do this?
So i am totaly new at unity. But i know coding basics. I just dont know hot to interact with the objects here.
I want to make a Project. So lets say if you draw a wall with the cursor(3d), a worker comes and build the wall, how do i do this?
Learn more coding basics.
The tutorials in the Learn section are pretty good, but if you want a book then Unity in Action is for people who already know coding basics.
Your task is pretty specific so I will attempt to give you more specific guides related to what you are trying to do.
You want the ability to click somewhere and spawn a wall (if I understood correctly). You will want to understand two principles for this. One being Physics.Raycast - this will help you understand how an object can be placed on the location you clicked. You will also need to understand object instantiation to spawn the wall object where you clicked. Finally you need to understand prefabs so you have an object to spawn into the scene.
Raycasting
Object Instantiation
Prefabs
Then you want a worker to come build the wall. So I am assuming you have workers walking around in your scene. You will need some AI pathfinding for this. First you should understand event handling. You will want an event to be called to one of your available workers to talk to his AI component to go build a wall (one of the actions needed in your AI).
As you can being to realize - understanding basic code isn’t enough to do most little things in unity. Hopefully this gets you headed in the right direction though.
Feel free to visit our YouTube channel for more Unity3D basics/intermediate tutorials on various topics.
Renaissance Coders