Streaming Level
Overview
Streaming Level refers to a collection of levels, which can dynamically load and unload level resources. With the Streaming Level feature, it is not necessary to load the entire scene resources after the player enters. The levels will be loaded and unloaded when the player walks to the designated area accordingly. This will save memory, reduce rendering pressure, and achieve a seamless large world.
Streaming Levels
Creating Streaming Levels
Click File (Menu Bar) -> New Streaming Level to open the Save Level As window. Click the button to select the level storage directory and enter a new streaming level name in Level Name. Click OK to complete.
Saving Streaming Levels
Double-click to select the streaming level node which will turn green after being selected in the Hierarchy panel. Click File (Menu Bar) -> Save Current Level (Ctrl+S) to save the currently selected level with the save path as the one selected at creation by default.
Or double-click the streaming level node in the Hierarchy panel, and click File (Menu Bar) -> Save Current Level As (Ctrl+Alt+S) to open the Save Level As window to set the new save path and name of the level. Click OK to complete.
Adding Streaming Levels
Click File (Menu Bar) -> Add Existing Streaming Level to open the Select File window. Select a created streaming level and click OK to add after which the level will be displayed in the right Hierarchy panel.
Level Streaming Volumes
Level Streaming Volume is a volume object used to assist in loading and unloading streaming levels. A Level Streaming Volume can be associated with multiple streaming levels, which can control the loading and unloading of the associated streaming level by judging whether the player enters or leaves the volume.
Creating Level Streaming Volumes
Click Create Game Object -> Volumes -> Level Streaming Volume to create a level streaming volume.
Note: The level streaming volume needs to be created in a Persistent Level, otherwise it will not take effect.
Select the Level Streaming Volume object in the Hierarchy panel. Set its brush builder type in the Brush Builder Class Name property and edit brush related parameters under the Brush Settings property in the Inspector panel.
Property | Description |
---|---|
Brush Builder Class Name | Generate brushes using the specified type brush builder. |
Hollow Out | Whether the cube is hollowed out. |
Tessellated | Whether additional internal faces need to be generated for each cube face. |
X | The size of the cube in the X-axis direction. |
Y | The size of the cube in the Y-axis direction. |
Z | The size of the cube in the Z-axis direction. |
Wall Thickness | The thickness of the cube walls when hollowed out. |
Using Level Streaming Volumes
Click Window (Menu Bar) -> Level Details to open the Level Details window. Select the streaming level, and click the Add Element button under the Streaming Volume List to select the volume to be added.
Property | Description |
---|---|
Level Angle X | Level X-axis angle (It will be applied to the scene objects within the level after the level is loaded). |
Level Angle Y | Level Y-axis angle (It will be applied to the scene objects within the level after the level is loaded). |
Level Angle Z | Level Z-axis angle (It will be applied to the scene objects within the level after the level is loaded). |
Level Position X | Level X-axis position (It will be applied to the scene objects within the level after the level is loaded). |
Level Position Y | Level Y-axis position (It will be applied to the scene objects within the level after the level is loaded). |
Level Position Z | Level Z-axis position (It will be applied to the scene objects within the level after the level is loaded). |
Initially Loaded | Whether the level needs to be loaded when the scene is loaded. |
Initially Visible | If the level needs to be loaded when loading the scene, whether it needs to be visible. |
Ignore Streaming Volume In Editor | Whether to ignore the streaming volume when loading or showing this level in the Editor. |
Should Be Loaded In Editor | Whether the level is loaded in the Editor. |
Should Be Visible In Editor | Whether the level is visible in the Editor. |
Add Element | Add an associated level streaming volume. |
Clear Elements | Clear all associated level streaming volumes. |