Give Page Feedback | API

Hierarchy Organizers - Standard Hierarchy Organizer

The Standard Hierarchy Organizer provides a comprehensive solution to organizing normal Unity Game Objects within the Scene Hierarchy.

Creating A Standard Hierarchy Organizer Component

You can add this component by selecting a game object and then selecting from the Top Menu Bar:

Component -> Deep Space Labs -> -> SAM -> Hierarchy Organizers -> Standard Hierarchy Organizer

Adding A Standard Hierarchy Organizer Component From The Top Menu Bar GIF

or by selecting a game object and using the Add Component menu via its inspector:

Component -> Deep Space Labs -> -> SAM -> Hierarchy Organizers -> Standard Hierarchy Organizer

Adding A Standard Hierarchy Organizer Component From Add Component Menu GIF

The Root Game Object

The Standard Hierarchy Organizer allows you to group all Game Objects that are a part of the hierarchy under a single root game object. This option is especially useful when used with the Standard Hierarchy World Shifter, as it allows you to shift everything by changing a single Transform's position (though note, this may have performance implications).

Grouping Options

The Organizer also allows you to group the Asset Chunks loaded by a World under various Parent Game Objects.

Each of these grouping options are fairly straightforward and the inspector includes tooltips detailing each option if you are confused.

When enabled, each option will result in one or more Parent Game Objects being created and added to the hierarchy, depending on what the grouping represents. Asset Chunks are added as descendants to the Groups they fall within.

For example, if Group Objects From Same World Grouping is enabled, a Game Object is created for each World Grouping on the World (World Grouping 1, World Grouping 2, etc.), and all Asset Chunks will be descendants to the Parent Game Object associated with their World Grouping.

Each option is listed in the order of its seniority, which is to say, if a grouping option is listed above another option, the Transform related to that group will always serve as a parent to any groups below it.

For example, if Group Objects From World Grouping and Group Objects From Same World Cell are both enabled, the Asset Chunks will be descendants of a World Cell game object (named after the endless grid cell of the World Cell), which will in turn be a descendant of a World Grouping parent game object.

Group Objects From Same Base Cell

Here, we will concentrate on the Group Objects From Same Base Cell. option, since it is potentially the most confusing of the options.

This option examines each Asset Chunk and groups them based on the Endless Grid Cell from World Grouping 1 that the Asset Chunk falls within. The Base keyword comes from the fact that World Grouping 1 is considered the Base World Grouping..

All Asset Chunks that fall within the same Endless Grid Cell are made descendants of the same Parent Game Object which is named according to the Endless Grid Cell value.

Naming Conventions

When Group Objects From Same Base Cell and/or Group Objects From Same World Cell are enabled, a Parent Game Object needs to be created according to Cell Indexes.

You can provide a 2D and/or 3D Naming Convention to utilize custom naming logic in order to generate these names.

More information on Naming Conventions can be found within the Naming Convention Section within the Scriptable Assets Chapter.

View Naming Convention Info

Transform Retrieval

By default, this script will track and store all root transforms (transforms without parents in the scene) related to chunks (game objects) of the World that is using this organizer

This allows for the retrieval of various transform in the hierarchy at runtime. Normally, this would not be a problem, however if you know that the setup of your organizer will result in a ton of root game objects in the scene, and you don't need to be able to retrieve the transforms of the hierarchy at runtime, you can disable transform retrieval (and thus root tracking) by enabling this option.

This could save on memory, though note that if you are using a Root Game Object, there will only be one root tracked, and thus not much memory will be used.

The Standard Hierarchy World Shifter makes use of Transform Retrieval, so you must leave this option disabled if using one with this Organizer.

Single Instance Per World

Each instance of the Standard Hierarchy Organizer can only be used with a single World!