Give Page Feedback | API

Active Grids - General Settings

General Settings apply to the Active Grid as a whole rather than on a per Grouping basis.

The Boundary Monitor

The Boundary Monitor is the component responsible for monitoring the Player's position in order to determine when the Player crosses from one Cell into another, across an Inner Area Boundary that triggers a change in the Active Cells used by a Grouping, or across a World Re-Centering Boundary. A single Boundary Monitor can be used with multiple Active Grids and Active Grid Groupings, so you should only ever need one in each scene.

Learn More About Boundary Monitors

Loading Blueprint Repositories

Each Active Grid is able to utilize a single Loading Blueprint Repository, which is simply a collection of Loading Blueprints. While you cannot change this repository at runtime, you are free to change any Grouping's Loading Blueprint to any other Blueprint found in the repository.

This is a powerful feature that gives you the freedom to change what's loaded based on custom criteria; for instance, you may allow the user to adjust the draw distance, which might require more Cells to be loaded. Or you may have a camera with zoom capability where more Cells need to be loaded the further it is zoomed in.

Because we keep the Repository fixed between gaming sessions, we are able to track and save the changes in Loading Blueprints between sessions.

Learn More About Loading Blueprints & Repositories

The Player

Each Active Grid needs a Player to track. Under the hood, a Player is simply any class that implements the IPlayer interface. This gives you a great deal of flexibility in how the Player is implemented, although in a majority of cases the Player will be Transform based.

Because Transform based Players are so common, the Active Grid inspector offers a convenient means of setting them up. You simply need to set the Player Type to Transform Player and assign the Transform you want to use as the Player to the Player Transform field. Under the hood, the Active Grid creates a custom class that implements the IPlayer interface while making use of the assigned Transform.

You can also assign a component based IPlayer (a script deriving from the CustomPlayer abstract class) by setting Player Type to Custom Player.

Finally, you have the option to skip assigning the Player via the inspector in favor of assigning it at runtime via scripting. To use this option, set Player Type to Assign At Runtime. This can be a great option if using non component based Players, or if your Player is created procedurally at runtime and cannot be assigned in the inspector.

Whichever option you choose, a Player must be assigned before the Active Grid is initialized! The Players Chapter includes more in depth information, including a Section dedicated to using Procedural Players (i.e., runtime spawned players).

Learn More About Players

Player Movers are special components responsible for moving the Player object when a move is required by the Active Grid (and in some cases, the Standard Hierarchy World Shifter). They are usually required when the Player interacts with Physics, because in those instances performing a simple Position.Set operation might result in the Player falling through the Terrain or other objects.

Learn More About Player Movers

Default Settings

The Default Settings are settings which are used so long as there isn't persistent data that overwrites them. For example, the Default World is the starting World the Active Grid will be synced to, however during the course of a game the Active Grid may become synced to a different World. When the state is saved while synced to this new World, upon loading the game save the Active Grid will be synced to it rather than the starting Default World.

World Re-Centering

When the Active Grid is synced to a World with Allow Active Grid Re-Centering enabled, you can enable the Allow Grid To Re-Center World option to enable auto World Re-Centering.

This technology results in the Active Grid tracking the Player's Position, and when the position crosses a boundary (defined via the World), it initiates an Origin Cell Change for the World that shifts the entire World so that the active area is closer to the Origin.

This technology is primarily intended to keep everything close to the origin in order to avoid floating point errors that can result from calculations involving very large numbers.

Do note that while this technology is the most convenient way to re-center the World, you can also manually trigger Origin Cell Changes based on other criteria, without the aid of the Active Grid, by using the World.ChangeOriginCell method.

In addition, World Regions contain Origin Cell data and when loading them, you can choose to set the Origin Cell to the Cell found in the World Region data.

Player Terrain Alignment

When one of the Active Grid's Groupings is linked to a World Grouping that uses Terrain, you can configure the Active Grid to align the Player with the terrain. This is an incredibly useful feature, as it allows you to easily move the Player around the scene (for testing purposes) without having to worry about changing the Y position to account for different terrain elevations.

--Special Note--
When player position data is stored in persistent data, the Y position from that data is treated as absolute upon being loaded. That is to say, terrain alignment will not occur. This ensures that the saved Y position is not overwritten by a re-alignment operation.