Seperating Complicated Scenes within a Level

Good day.

Hope someone can help me.

I think this is just the reality of the game I’m making hitting me in the face, but I’ll ask anyway.

I have a level where you walk around in first-person through a number of different rooms.

I am currently trying to create individual rooms (consisting not only of Static Meshes (cups, chairs, tables, barrels, etc.), but also interact-able Actors, AI, etc.), group them together and then “hide” them.

Then, at some point, these rooms will “Spawn” in (or become visible) and the player is able to enter and interact with everything. I need to do it this way because the rooms will change. Drastically.

The way I’m currently doing it is I create the individual room, create a separate blueprint actor called BP_Room that has a TArray<AActor*> variable. I then manually add an element to this array and, using the “Picker”, pick ONE of the Static Meshes, Blueprint Actors, AI, etc relevant to the individual room. For. Every. Single. Object. Each of these rooms might have 50 different objects.

I’m guessing that this is the nature of the beast if you want to have entire rooms that are interact-able, be hidden.

Or is there perhaps another way?

PS: I am using C++, but I think this is a Blueprint problem since I’m creating the rooms in the editor and am trying to… well… connect them to a Blueprint Actor.

Thank you in advance.

I don’t quite get your setup ( or reason for it, mostly ), but what about giving the actors tags. That way each room can collect it’s actors on begin play?

You could also use level streaming ( or level instancing ), which lets you setup the rooms as separate levels, and then its clear where they belong. You can ‘unhide’ by just streaming or loading.

Thanks for the response!

For some reason I thought that there could only be ONE Level active in Unreal. Never thought about the concept of Sub-Levels (I don’t know what I don’t know; LOL).

I watched this video and I think this is what I wanted.

Thank you for your help!

PS: Just some extra explanation for those curious:

The player will walk around a building that’s made up of different rooms. However, the room that is behind a door will not always be the same (it might be a completely different room from when you were last there.)

Imagine each room being a Lego piece and me having to switch out entire rooms when needed.

Again, thanks for your help. I think the above will help me.

Also take a look at level instances, because with streaming, things always appear in the same place, whereas with instances, you can change the position / rotation etc :slight_smile: