LoadingBlueprint Class

public sealed class LoadingBlueprint

Defines a loading blueprint, which is a collection of one or more loading patterns.

Loading Patterns are used in conjuction with the Player's position to determine which cells should be loaded at any given time.

Loading Blueprints are defined within Loading Blueprint Repositories, which offer a single access point for multiple loading blueprints. The repository simplifies the process of switching loading blueprints at runtime (which has many uses, not least of which is increasing performance or graphics fidelity to target the player's hardware [either automatically or by allowing the player to adjust graphics settings in a menu]). Without the repository, saving changes to loading blueprints at runtime (using save data) would be much more difficult.

Each Active Grid can be assigned a Loading Blueprint Repositories. You can then choose a default Loading Blueprint for each Active Grid Grouping to use.

Properties

Name Type Description
InnerAreaColumns int

Gets the number of inner area columns in the Loading Blueprint.

InnerAreaLayers int

Gets the number of inner area layers in the Loading Blueprint. Only valid when the loading blueprint is 3D.

InnerAreaRows int

Gets the number of inner area rows in the Loading Blueprint.

Is3D bool

Gets a value indicating whether the Loading Blueprint has cells on all three dimensions (X, Y, and Z). 3D Blueprints can only be used with Active Grid Groupings synced to 3D World Groupings, while 2D Blueprints can only be used with Active Grid Groupings synced to 2D World Groupings.

LoadingBlueprintType LoadingBlueprintType

Gets the loading blueprint type of this loading blueprint.

MaxLevelsOfDetail int

Gets the maximum number of LODs used by this loading blueprint. Some individual Loading Patterns may have less LODs than this value.

Name string

Gets the name of the Loading Blueprint.

RepositoryID int

Gets the repository index of the Loading Blueprint, which is assigned to the Blueprint when it is added to the repository and will never change so long as the Blueprint is not removed from the repository.

This is more reliable than the Name, as even if the Name changes this ID will remain the same.

SectionColumns int

Gets the number of sectional columns in the Loading Blueprint. Only valid when the loading blueprint type is Uniform Sectioned

SectionLayers int

Gets the number of sectional layers in the Loading Blueprint. Only valid when the loading blueprint type is Uniform Sectioned and the blueprint is 3D.

SectionRows int

Gets the number of sectional rows in the Loading Blueprint. Only valid when the loading blueprint type is Uniform Sectioned

Methods

GetCells(Cell, Cell, ICollection<LODCell>)

public void GetCells(Cell patternKey, Cell firstCellInInnerArea, ICollection>LODCell< cells)

Gets the Cells for the given loading pattern (using patternKey). Note that internally the loading pattern Cells are just a collection of offsets from the first Cell in the inner area of the loading pattern.

Therefore, in order to get a collection of useful cells that corresponds to the World, it is necessary to provide the value of the first cell in the inner area.

Parameters

Name Type Description
patternKey Cell

The Cell that identifies the loading pattern to get Cells for. If using a Uniform Ring or Uniform Custom Shape Blueprint, this value is ignored, as there is only a single default loading pattern to choose from.

For Sectioned Blueprints, the pattern key is the sectioned Cell whose pattern of Cells you want to retrieve. For instance, the bottom left most sectioned cell would always be Cell(1,1) or Cell(1,1,1) [for 3D blueprints].

For Non Uniform Blueprints, the key is the Streamable Grid Cell that is at the center of the pattern (typically the Cell the player is standing in), and should be the same as firstCellInInnerArea.

firstCellInInnerArea Cell

The value of the first cell in the inner area of the loading pattern identified by patternKey. Used to assign real world values to the cells, because otherwise they are just offsets. If you want the raw offset values, simply pass in Cell.Zero.

When using a Non Unfirom Blueprint, this Cell should be the same Cell as patternKey (unless you are trying to get raw offset values), since Non Uniform blueprints only contain patterns with a single inner area Cell.

cells ICollection>LODCell<

The collection of LOD Cells which this method will add the cells to. Used to save on memory, as you can reuse the same collection (clearing before hand of course) before calling the method. Note that use of the ActiveGrid.GetRegisteredActiveCells method automatically clears the collection if it is not empty, so you don't have to. The collection can be any type that implements the ICollection<LODCell> interface, such as a lists or hash set.