How can you build in game with use of materials.

How can you build in game with the use of materials. Are there example code or solutions for doing this?

Also if you can build with materials how can you:

Gather materials from another object like bark from a tree or wood from a tree or a branch from a tree?

Also how can you show the building being built by the player as you control the building process?

(I am only looking for basic solutions but if you have detailed code or solution examples then that would be great.)

Thanks

I am sorry, but what are you trying to build in game?

Any object that I would have a 3d model for and want to build it in the game

Also why would it matter what I build, I just want to build stuff and code that ability into the game

It matters because I had no idea what you meant. You could have for example wanted to make a level editor. Or, maybe make your own models. Simply saying build something in game really isn’t specific enough to get you any help at all.

Anyways, it sounds like you just want to be able to place models while you are inside the game? Well, I would recommend using instantiate to ‘build’ objects in a game. If you want to change there materials in game, just set the instances to variables so you can easily change them.

yes building with objects that i have already created…sorry for the misunderstanding…also thanks for the link :slight_smile:
can I use this (instantiate) for digging on terrain in game to make a hole for example?

i think instantiate is for placing stuff only mate.