Objective:
Set specific parameters for each streaming layer to control how and when objects within those layers are loaded and unloaded.
Why This Step is Important:
Proper configuration ensures that each category of objects behaves optimally, balancing performance with visual fidelity based on their importance and size.
Detailed Instructions:
- Access Streaming Layers Configuration:
- Open the Scene Manager:
- Navigate to the Streaming Layers tab.
- Select a Streaming Layer:
- Click on a streaming layer you created, e.g.,
TerrainAndTrees.
- Click on a streaming layer you created, e.g.,
- Configure Size Parameters:
- Size X and Size Z:
- Definition: Maximum distance (in meters) at which objects in this layer are rendered.
- Terrain Example: If terrains are split into 500m chunks (
Split Sizeof 2), setSize XandSize Zto 500.
- Medium and Small Objects:
- MediumOutdoorObjects: Example Size X/Z = 250m.
- SmallOutdoorObjects: Example Size X/Z = 100m.
- Guideline: Base the size on the split terrain size, adjusting smaller layers proportionally.
- Size X and Size Z:
- Optional Y Splitting:
- Purpose: Split objects vertically, useful for environments with underground or underwater elements.
- Setting Split Y:
- Enable Split Y if your game world includes vertical variations.
- Define Size Y based on gameplay needs, e.g., 100m for small objects that might be submerged.
- Define GameObject Prefix:
- Purpose: World Streamer identifies which objects belong to each streaming layer using prefixes.
- Methods:
- Naming Objects: Prefix the name of each GameObject with the layer’s prefix.
- Example: For
HugeObjects, name buildings asHuge_Building1,Huge_Building2.
- Example: For
- Parenting Objects: Nest objects under a parent GameObject with the
ObjectParentscript component.- Set the prefix within the
ObjectParentcomponent.
- Set the prefix within the
- Naming Objects: Prefix the name of each GameObject with the layer’s prefix.
- Example Prefix:
Huge_for theHugeObjectslayer.
- Set Scene Prefix:
- Definition: A unique identifier for scenes managed by the streaming layer.
- Customization: Can be similar to or different from the GameObject prefix.
- Example: For
HugeObjects, set Scene Prefix toHugeScene_.
- Repeat for All Streaming Layers:
- Perform the above configurations for each streaming layer you’ve created, adjusting parameters as necessary based on object categories.
Example Configuration Table:
| Streaming Layer | Size X (m) | Size Z (m) | Split Y (m) | GameObject Prefix | Scene Prefix |
|---|---|---|---|---|---|
| TerrainAndTrees | 500 | 500 | N/A | Terrain_ | TerrainScene_ |
| LowPolyTerrainMeshes | 500 | 500 | N/A | LowPoly_ | LowPolyScene_ |
| HugeObjects | 500 | 500 | N/A | Huge_ | HugeScene_ |
| MediumOutdoorObjects | 250 | 250 | 100 | Medium_ | MediumScene_ |
| SmallOutdoorObjects | 100 | 100 | 100 | Small_ | SmallScene_ |
Notes:
- Trial and Error: Finding the optimal
Size X,Size Z, andSize Yvalues may require testing and adjustments based on your game’s specific requirements. - Performance Monitoring: Regularly profile your game to ensure that streaming layers are performing as expected without causing bottlenecks.
Tips:
- Consistency: Maintain consistent prefixes across objects and scenes to streamline management.
- Documentation: Keep a record of your streaming layer configurations for future reference and team collaboration.
