creating a random interior level

hello,

iam pretty new to unity but i always learn with my own projects.

what i wanna achive is a complete random generated level , whichs exists only of rooms. imagine it as a the interior of a starwars space ship.

so i brainstormed a little bit.

i could create some basic rooms in maya ( shapes ) like a room with 4 doors, a room with no door , a floor, etc. which i can align seamlessly.
I also dont want to texture etc them, this should be random generated too.

What i need would be some basic functons like how to draw objects in the editor.
So my question :
Does unity provide such functions or do i have to implement this by myself ?
(couldnt find anything in the doc :confused: )

i could create the interior with the tools of unity , like cube , sphere etc, which would give me a lot more control. but i dont know, would you use a box tool in production ?

basically i would set up each room in a standard side in maya, texture each all with a texture file don’t do a big UV map so that you can tile the textures in unity, then export to unity

take the fbx files into unity scene and make a prefab out of each

then set a script up that has an array of game objects to hold all your different room types

then script it depending on how many rooms you want to do a random.range of the array of game objects

you’ll also have to script it check what type of room it is and then what side the room would be on.

use random.range again for you to set the random size of the room, and then have it take the size of the room, divide it in half, and then take the last room you instantiated as well divide it in half and add the too lengths together which will get the rooms to be placed right next to each other. again test script it to set it up depending on the side it should be on and such. you just use transform.position to move it to the location.

Then for the texture, you can get the size of each wall and set up a math function to deepening on the size it can set the tiling of the texture so that it looks correct in each room.

Hope this kinda gives some insite and hope i don’t totally confuse you. But I have the idea in my head its just hard to get out with me test scripting it myself.

But there would be problems with doors per say cuz when you stretch the mesh it would effete a door size and such, so you would have to figure out a way around that.