hi guys, i’m newbie to Unity 3D.
I work on a project building procedurally buildings.
My problem is: I stuck on how to make a roof Object by scripting and attach it to a gameObject. The model of my roof is like this picture below.
This is one of the most primitive volumes you could create. Do you even know how to create a Mesh procedurally? Do you ask for an out-of-the-box solution? What could someone answer to such a question except a script that does what you want?
Create a Prefab and instantiate it then resize at the correct location.
Side Note - What you are asking is on of the most basic of basics. The people here are nice enough to answer smaller questions like this - but if you really want to make a game and be good at it. You realy need to put more effort
into improving yourself. I HIGHLY recommend that you do some tutorials on the types of games you want to make, then try to make your own version of it. It is the best way to learn.