public sealed class StandardHierarchyOrganizer : HierarchyOrganizer
Provides a default implementation of the HierarchyOrganizer
class, which is responsible for organizing the chunks of
worlds into manageable hierarchies.
This class provides a small number of settings to give you decent control over how
the organization is performed, but for more fine tuned approaches you would be better
off creating a custom class
that derives from HierarchyOrganizer class.
This Organizer can be used in conjunction with a
Standard Hierarchy World Shifter.
If using multiple Worlds at the same time, each World must use a different instance
of the Organizer!
Name | Type | Description |
---|---|---|
GetAllBaseCellTransforms | Action<List<Transform>> |
Gets a method that can be used to retrieve all Base Cell Transforms (used to group
chunks that share a
common base cell, which is a cell from the Base Grouping) currently in this hierarchy.
Can only be used when Disable Transform Retrieval is disabled and Group Objects From
Same Base Cell is enabled.
|
GetAllChunkTransforms | Action<List<Transform>> |
Gets a method that can be used to retrieve all transforms of the chunks themselves
(game objects associated World Cells)
that are a part of this organizer. Can only be used when Disable Transform Retrieval
is disabled.
|
GetAllLODTransforms | Action<List<Transform>> |
Gets a method that can be used to retrieve all LOD Transforms (used to group chunks
from the same
LOD) currently in this hierarchy.
Can only be used when Disable Transform Retrieval is disabled and Group Objects From
Same LOD is enabled.
|
GetAllWorldCellTransforms | Action<List<Transform>> |
Gets a method that can be used to retrieve all World Cell Transforms (used to group
different chunks from the same
World Cell) currently in this hierarchy.
Can only be used when Disable Transform Retrieval is disabled and Group Objects From
Same World Cell is enabled.
|
GetAllWorldGroupingTransforms | Action<List<Transform>> |
Gets a method that can be used to retrieve all World Grouping Transforms (used to
group chunks from the same
World Grouping) currently in this hierarchy.
Can only be used when Disable Transform Retrieval is disabled and Group Objects From
Same World Grouping is enabled.
|
GroupObjectsFromSameBaseCell | bool |
Gets a value indicating whether objects in this hiearchy organizer that reside within the same Base Cell (cell on World Grouping 1) are set to be grouped together under a common parent. |
GroupObjectsFromSameLOD | bool |
Gets a value indicating whether objects in this hiearchy organizer that reside on the same LOD are set to be grouped together under a common parent. |
GroupObjectsFromSameWorldCell | bool |
Gets a value indicating whether objects in this hiearchy organizer that belong to the same World Cell are set to be grouped together under a common parent. |
GroupObjectsFromSameWorldGrouping | bool |
Gets a value indicating whether objects in this hiearchy organizer that reside within the same World Grouping are set to be grouped together under a common parent. |
NumberOfBaseCellTransforms | int |
Gets a value indicating how many Base Cell Transforms are present in the hierarchy. |
NumberOfChunkTransforms | int |
Gets a value indicating how many Chunk Transforms are present in the hierarchy. |
NumberOfLODTransforms | int |
Gets a value indicating how many LOD Transforms are present in the hierarchy. |
NumberOfWorldCellTransforms | int |
Gets a value indicating how many World Cell Transforms are present in the hierarchy. |
NumberOfWorldGroupingTransforms | int |
Gets a value indicating how many World Grouping Transforms are present in the hierarchy. |
RootOfEverything | Transform |
Gets the root transform of all objects in the hierarchy, if such a root transform exist. If none of the grouping options are enabled, this will return null. |
TransformRetrievalDisabled | bool |
Gets a value indicating whether the transform retrieval has been disabled. If disabled, you cannot use the GetAll...Transforms methods! |
public sealed override void AddChunkToHierarchy(GameObject chunk, WorldCell worldCellChunkBelongsTo)
Adds a chunk (game object) to the hierarchy.
Name | Type | Description |
---|---|---|
chunk | GameObject |
The chunk (game object) to add to the hierarchy. |
worldCellChunkBelongsTo | WorldCell |
The World Cell the chunk belongs to. You can use information from the World Cell to help organize the object into the hierarchy, for instance by using the CellOnEndlessGrid, BaseCellThisCellResidesIn, and DoesCellHaveMultipleChunks properties directly or by using the GridLayer and LevelOfDetail properties in conjunction with the convenience methods of the base HierarchyOrganizer class ( GetLODGroupName, IsWorldGroupingChunkIsOn3D, and DoesLODChunkIsPartOfUtilizeChunking). |
public sealed override void InitializeAdditional()
Initializes additional stuff for the standard hierarchy organizer.
public sealed override void RemoveChunkFromHierarchy(GameObject chunk, WorldCell worldCellChunkBelongsTo)
Removes a chunk (game object) from the hierarchy. This should be relatively straightfoward and should not require the lod Group Name or organizational info.
Name | Type | Description |
---|---|---|
chunk | GameObject |
The chunk (game object) to remove from the hierarchy. |
worldCellChunkBelongsTo | WorldCell |
The World Cell the chunk belongs to. |