Scene Streaming
Overview
Scene Streaming, also known as Scene Object Streaming, refers to considering a single Game Object as an object, loading and unloading it according to certain rules. Scene Object Streaming can reduce the conflict probability when multiple people develop the same scene, and improve the efficiency of scene development.
The old scene format will save all scene objects. Once a scene object is modified, the entire scene file will be affected for the conflict granularity is all objects in the entire scene. The scene file of the streaming scene will not save the scene object and its loading is determined by the extensible streaming rules. Each streaming object corresponds to a file, reducing the conflict granularity down to the level of a single scene object. Projects can inherit the scene streaming base class to customize scene streaming rules.
Enabling Scene Streaming
Click Config (Menu Bar) -> Project Settings to open the Project Settings window. Select the General Project Settings tab to display the right panel. Check Enable Scene Streaming under the Scene Streaming Config property.
Creating Empty Levels
Create an empty level that supports Scene Streaming. Click File (Menu Bar) -> New Level From Template to pop up the Open Level window. Select a template level and double-click to create.
Scene Streaming Configs
Select LSceneSettings-1 and LSceneSettings-1(Instance) in the Hierarchy panel and Inspector panel respectively. Then the related property parameters can be set under Scene Streaming Config.
Click the button on the right side of Editable Groups to add a new group at the end of all existing groups. Click the
button on the right side of the group number to insert a new group below the corresponding group.
Property | Description |
---|---|
Enable Debug Draw | Whether to draw auxiliary lines for debugging. |
Focus Start | Focused streaming source start index. |
Draw Left | Auxiliary line left offset in the screen space. |
Draw Top | Auxiliary line top offset in the screen space. |
Draw Group Width | Auxiliary line group width. |
Draw Group Num Per Row | Number of groups per row. |
Group Name | Name of the group. |
Node Num Per Dim | Number of nodes per dimension. |
Load Extent | Load range (LoadNum=2*LoadExtent+1). |
Visible Extent | Visible extent (VisibleNum=2*VisibleExtent+1). |
Node Size | Size of the node. |
Draw | Whether the group needs to be drawn (for debugging). |
Draw Node Num | Number of nodes to draw (for debugging). |
Enable Scene Streaming | Whether to enable scene streaming. |
Scene Object Scene Streaming Configs
Click Create Game Object -> Character to create scene objects.
Select LCharacter and LCharacter(Instance) in the Hierarchy panel and Inspector panel respectively. Then the related properties can be set under Scene Streaming.
Property | Description |
---|---|
Group Name | Group name. If there is a matching group name, it will be loaded according to the group strategy. |
Has Streaming Bundle | Whether to enable streaming bundle. |
Load Mode | Including Position and Always Load modes. The former is affected by the specified group name strategy; the latter is not affected by the streaming group strategy. |