Possible to create walls, doors, windows from a script?

I’m new to Unity and trying to see if it is flexible enough for my needs or if I should just use HTML/Javascript. I’m able to manually place four walls (a default ‘cube’ from unity that I changed the dimensions on) in the Unity editor. Am I able to do this via a script?

Ultimately I want to be able to generate lots of rooms dynamically, but I don’t even know how to do the first part of this automatically. :slight_smile:

My script will eventually need to have multiple doors in each room, with each door connecting to another room. Each door will also have a unique name above it. The material/color of each room also needs to be different.

I don’t want to create a prefab of a room and just use that as a ‘stamp’ to create more rooms just like the first one, I need to have each room be different.

Is this possible to do in Unity? If so, I would really appreciate help with the basic idea since I don’t even know where to start…

If it matters, I prefer using C# or Javascript.

You could make a script to determine an array of where the objects within a room would be, and make prefabs for the door walls and etc. Then in script instantiate them in accordance to your arrays. Boom. You got yourself a room.