is it possible to programatically move a room?

Is there a way to change the room layout in a given scene? I don’t really mean add one, but move it from elsewhere in the scene, where it’s inaccessible.
I have thought about opening/unlocking doors, but that just doesn’t really suit what I’m trying to accomplish, which is a house that changes its room layout when I complete a task and then return to the kitchen. I want, for example, what was a living room with another exit 30 seconds ago to now be a closet. Later, I want the kitchen door to change walls.
Alternatively, if that’s not feasible, is there a way to make the transition between scenes seamless?


There is a relatively common technique for big levels to be split into smaller sections and then only the required sections get loaded when the player enters some invisible trigger collider in e.g. a corridor.

I think you could use a similar technique for your rooms: You might have a BoringLivingRoom and SecretLivingRoom and when you approach it, some invisible collider on the way will look at your game progression and load/unload the rooms if necessary.

This technique is definitely more viable if there are big differences between your rooms - say, if your living room turned into a castle - and where the alternative of just enabling/disabling some objects is not an option.

Though you should consider if this alternative might not suit your game better: If all you’re doing is blocking some path with a closet, or changing the material on a wall, there’s no need to go to all this work for what could be done by a unity event.

Hope this helps :smiley:

I think you hit it right on, thank you! All I meant with the closet bit, was an entirely different room.

I forgot to mention I’m new to both Unity and game development (I remember intending to…), so could you elaborate a bit? I think I understand the collider and trigger bits well enough, but not sure how I’d deal with the room placement. Will the editor let me have BoringLivingRoom and SecretLivingRoom overlap, but one hidden? Do I have the trigger destroy the Boring one and move Secret into place from elsewhere? Load it from a prefab?