public sealed class GridLODDetails: IIdentifiable
Stores information on a Streamable Grid LOD Group. You can modify this information via the Streamable Grid's inspector.
Name | Type | Description |
---|---|---|
ChunkType_PreInitSafe | ChunkType |
Gets the Chunk Type used by this LOD Group (type of Asset Chunks that are loaded via Chunk Streamers). |
ChunksUsePositionalData | bool |
Gets a value indicating if the LOD Chunks uses positional data. If the Chunk Type
is None, this
always returns false. If it is Unity_Terrain, it always returns true. Otherwise, it
returns the value of
'Uses Positional Data' set in the insepctor of the LOD Group on the Streamable Grid.
|
DoAllCellsUseSameNumberOfChunks | bool |
Gets a value indicating whether all Streamable Grid cells associated with this LOD Group use the same number of chunks. You can only access this property after the Streamable Grid has been initialized. |
GroupName_PreInitSafe | string |
Gets the Group Name asigned to this LOD Group in the Streamable Grid inspector. Note,
if the Group Name
of the LOD Group has been manually changed either pre or post World initialization,
it will
not be reflected here.
|
ID | int |
An ID that identifies this LOD Group. It is assigned automatically at the time the
LOD Group is created and will never change, regardless of
whether you change the order of the LOD Group on the Streamable Grid.
|
LevelOfDetail | int |
Gets which level of detail these details belongs to on the Streamable Grid. You can find this number in the LOD Groups tab of the Streamable Grid, under the "Add LOD Group" button. It is the number shown on the tabs that allow you to select each LOD Group. |
NamingConvention | INamingConvention |
Gets the naming convention used by this LOD Group. |
RootState | RootState |
Gets the state of the root game objects in Scene Based Asset Chunks for this LOD Group.
|
StreamableGrid | StreamableGrid |
Gets the Streamable Grid this LOD Group is a part of. |
StreamableGridCellWithChunkSetToUse_PreInitSafe | Cell |
When UseSingleChunkSetForAllCells_PreInitSafe return true, this returns the cell on the Streamable Grid whose chunks will be used for all World Cells on this LOD. All included Chunk Streamers can make use of this functionality, however note that if you create a custom Chunk Streamer, you will need to add the necessary code to make this work, or else disable this option in the inspector of your Streamable Grid. |
UseSingleChunkSetForAllCells_PreInitSafe |
Gets a value indicating whether this LOD is using a single chunk set (from the Streamable Grid Cell indicated by StreamableGridCellWithObjectSetToUse) for all World Cells. All included Chunk Streamers can make use of this functionality, however note that if you create a custom Chunk Streamer, you will need to add the necessary code to make this work, or lease disable this option in the inspector of your Streamable Grid. |
|
UsesTerrain | bool |
Gets a value indicating whether the LOD Group uses Unity Terrain. |
UtilizesMultiChunking_PreInitSafe | bool |
Gets a value indicating whether this LOD Group utilizes multiple chunks for its cells.
If this is true, the naming
convention you set for this Streamable Grid LOD Group must include the special %c
characters in the Supplemental Chunk Format field. This format
is used for Chunks 2+ in each cell's chunk set.
|
VisualStateOfStoredAssetsWhenActive_PreInitSafe | VisualState |
Gets the stored visual state of the assets associated with this LOD, which is only
applicable when using a Cell Visual Transition Controller.
To determine this, imagine the assets were added to the scene and put into an active
state (using SetActive(true) for game objects for instance),
and then positioned according to the PositionOfChunks property of whatever World Cell
they are associated with. If the objects would be visible after
this, the stored state is Visible. Otherwise, it is
Invisible.
|
public ReturnType GetCellChunksUsingEndlessGridCell(Cell endlessGridCell)
Gets the number of chunks used by a particular Endless Grid Cell for this LOD Group.
Name | Type | Description |
---|---|---|
endlessGridCell | Cell |
The cell whose number of chunks you wish to know. |
int
The number of chunks used by the cell.
public int GetCellChunksUsingStreamableGridCell(Cell streamableGridCell)
Gets the number of chunks used by a particular Streamable Grid Cell for this LOD Group.
Name | Type | Description |
---|---|---|
streamableGridCell | Cell |
The cell whose number of chunks you wish to know. |
int
The number of chunks used by the cell.
public int GetLargestChunkValue()
Gets the largest number of Chunks used by a Cell for this LOD Group.
int
The largest number of chunks used by a cell in this LOD Group.
public INamingConvention NamingConvention_PreInitSafe(bool isGrid3D)
Gets the Naming Convention used by the LOD before the Grid has been initialized. If you know the Streamable Grid has been initialized, using the NamingConvention property will be faster and is recommended, however if you are not sure, or know that the Grid has not been initialized, you must use this method to avoid errors.
Name | Type | Description |
---|---|---|
isGrid3D | bool |
Whether the Streamable Grid used the Three Dimensional Axes Type. |
INamingConvention
The naming convention. Will return a default convention if the Naming Convention set
on the LOD is null.
public void SetExtraData_PreInitSafe(string key, string data)
Sets the data for a given key.
This will replace any existing data using the key for this LOD, or create a new entry
if there is no existing entry using the key.
Generally speaking, you should call this method before SAM has been initialized in
order to ensure that anything making use of the
Extra Data will have the correct value, as most things making use of it will retrieve
the extra data just once (when SAM is
initialized) and cache the value for performance reasons.
If the extra data you are trying to change is stored in the Global Extra Data instead,
you should use the Streamable Grid's
SetGlobalExtraData_PreInitSafe method instead.
Name | Type | Description |
---|---|---|
key | string |
The key used to set the extra data. |
data | string |
The data to set. |
public bool TryGetExtraData_PreInitSafe(string key, out string data)
Tries to get extra data stored on this LOD Group using a key string value.
This data must be configured in one of two ways. Via the Streamable Grid inspector,
either in the
global extra data for the Streamable Grid, or in the Extra Data section for the LOD.
Or via the
SetExtraData_PreInitSafe method.
If you used one of the preset keys, make sure the key you pass into this method matches
how this preset appears in the inspector exactly!
The method works by first trying to access the LOD Group specific extra data, and
if that extra data contains a matching key, it returns the
data from the LOD Group. If no matching key is found in the LOD Group's extra data,
the method searches the Streamable Grid's global extra data for the key,
and returns the data if found. If no key is found in either place, data is set to
null and false is returned.
Name | Type | Description |
---|---|---|
key | string |
The key used to access the extra data. |
data | string |
If the method returns true, this will contain the extra data associated with the input key. If it returns false, this will be null. |
bool
True if the extra data was successfully retrieved. False otherwise.