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 int GetCellChunksUsingArrayIndex(int flattenedStreamableGridIndex)
Gets the number of chunks used by a particular Streamable Grid Cell for this LOD Group, however uses the flattened index of the Streamable Grid Cell.
Name | Type | Description |
---|---|---|
flattenedStreamableGridIndex | long |
The index of the cell whose number of chunks you wish to know. You may come by this
value in two ways.
|
int
The number of chunks used by the cell.
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 NativeArray<int> GetChunksArrayAsNativeArray(Allocator allocationType)
Creates and returns a Native Array that represents the chunk values for each cell
on the Streamable Grid in association
with this LOD Group.
The only use case for this is if you need to do some processing involving the number
of chunks and
you have an incredibly large number of cells on the Streamable Grid.
Otherwise you should make use of the other "GetCellChunks..." methods instead.
Note that if all cells use the same number of chunks, the array will be of length
1 with the uniform value stored at index 0.
Name | Type | Description |
---|---|---|
allocationType | Allocator |
The type of allocation to use for the Native Array. |
NativeArray<int>
The native array. Will be of length 1 if all cells have the same number of chunks.
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 the Streamable Grid inspector, either in the
global extra data for the Streamable Grid, or in the Extra Data section for the LOD.
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.