The Active Grid tracks your Player and makes decisions about which World Cells are needed based on where the Player is in the World. Those decisions are made with the aid of Loading Blueprints, which define the patterns of World Cells to load depending on where the Player is located.
The Active Grid is an optional Component, meaning you can forego its use if you wish (in which case, you will need to use World Regions or a custom solution to add/remove World Cell Users to the World).
For most developers, however, the Active Grid is the perfect tool to implement dynamic worlds, so it's more than likely you will wish to use it. For now, even if you think you might not want to use it, it's best to use it until you gain a better understanding of the Streamable Assets Manager.
29) Identify the Player that the Active Grid will track. This will most likely be the game object that represents your player character. The world position of this object must represent the actual world position of your player in order for the Active Grid's tracking to work correctly (Assigning The Player Sub-Section).
30) If you have identified your Player as a normal game object, assign it to the Player Transform field on the Active Grid, found in the General Settings tab (Assigning The Player Sub-Section).
31) If you have identified your Player as a non-game object or procedurally created Player, take a look at the Guide Sections indicated in the Assigning The Player Sub-Section.
32) Take note of the Defaults settings. These settings are only used when persistent save data does not exist for the Active Grid. This is an important concept, so it's worth reading the Defaults Sub-Section in detail at some point.
33) If using a Floating Origin based World, determine whether the Allow Grid To Re-Center World and Move Player After Origin Cell Change settings should be enabled (Defaults Sub-Section).
34) Create a Loading Blueprint Repository asset in your Project Hierarchy (Loading Blueprints Sub-Section).
35) Assign the asset you just created to the Loading Blueprint Repository field (found under General Settings/Basic Settings) on the Active Grid (Loading Blueprints Sub-Section).
36) Edit the Repository by pressing the Launch Blueprint Editor button on the Active Grid, then add its first Loading Blueprint using the Create Loading Blueprint button within the Loading Blueprint Editor (Loading Blueprints Sub-Section).
37) The default Uniform Ring Blueprint should be suitable for now, however you are free to change this blueprint if you wish (including its name). We link to a Section of the Guide that details the different Blueprint types in the Loading Blueprints Sub-Section).
38) Click on the Groupings tab on the Active Grid and confirm that Grouping 1 has the Loading Blueprint you just created selected in the Loading Blueprint dropdown (Loading Blueprints Sub-Section).
39) Though not required, we suggest reading the Groupings Sub-Section to understand the relationship between Active Grid Groupings and World Groupings.
40) Enter Play Mode! Everything should be configured correctly and your game world should load in, however if something is not, you should see errors or messages in the console window. Please use these (click on each message to see the full text!) to diagnose what is wrong, then use the FAQ chapter to see if you are running into one of the common issues. If not, and you cannot figure out what's going, don't hesitate to reach out to us via our Discord Server, the Unity Forums, our Contact Form on the website, or directly via email (buttons for all of these are provided at the top of the Guide Window).
Return To Section Instructions
The Active Grid cannot function without a Player assigned. If you are using a normal Unity Game Object with a Transform Component as your Player, assigning the Player is very simple. Just drag and drop the game object to the Player Transform field.
If you are not using a traditional Transform as your Player or are using a runtime created Player that needs to be assigned via Scripting, please take a look at The Player Sub-Section within the General Settings Section of the Active Grids Chapter, or the Procedural Players Section in the Players Chapter.
--Sample Scene Directions--
This scene uses a simple Transform on a Game Object called Player. Assign this Player object to the Player Transform field.
Return To Section Instructions
Default Settings can be found both in the General Settings Window and on a per Grouping basis. They are starting values that the Active Grid uses when no persistent data exists for the Active Grid. If persistent data does exist, in most instances the values for these settings that is found in the persistent data will be used.
The most important of these is the World, as it defines the World that the Active Grid starts the game synced to, which controls which Asset Chunks will be loaded. However, you can change the World that the Active Grid is synced to at runtime, and if you do, the change is saved with persistent data. The default World is not used in this situation when the data is loaded.
The settings found below the World are also modifiable at runtime, which allows you to change them depending on the World you are syncing the Active Grid to.
If you are using a large floating origin based World and have enabled the World's Allow Active Grid Re-Centering setting, you should also enable the Allow Grid To Re-Center World setting on the Active Grid
Return To Section Instructions
Each Active Grid stores a reference to a Loading Blueprint Repository, which is simply a container Scriptable Asset that stores one or more Loading Blueprints.
There is a whole Chapter dedicated to Loading Blueprints and Repositories; you can find a button that will take you to it below. For now, these brief instructions should help you get started:
1) Create a new Loading Blueprint Repository by right clicking the folder where you want to place the Scriptable Asset and choosing Create -> Deep Space Labs -> SAM -> Loading Blueprint Repository.
2) Rename the Asset to something you will be able to identify. A good option might be First Repository
3) Left click the asset and press the Edit Repository button in the inspector.
4) In the top left of the Loading Blueprint Editor Window you will see a sub window called Main Controls. Press the Create Loading Blueprint button in this sub window.
This creates a basic 2D 3x3 Uniform Ring Pattern. Basically, whichever World Cell the Player is standing in, that Cell plus the 8 neighboring World Cells will be loaded. While you could change the Blueprint Type or adjust other settings, for now this simple pattern should suffice (unless you know that you need a 3D pattern, in which case you can change it to 3D).
--Upgrade Note--
This basic pattern corresponds to the previous Active Grid Type of Outer_Ring_Grid with a single Inner Area Layer, Row, and Column and an Outer Ring Width of 1.
--Sample Scene Directions--
While you could make use of the Sample Blueprints Repository, we recommend creating a new Repository so that future Sample Package upgrades do not erase or modify any changes you make to the Repository. The easiest way to do this is to simply duplicate the Sample Blueprints Repository, move it to a new folder, rename it, and then assign it to the Active Grid's Loading Blueprint Repository field.
Go In Depth With Loading Blueprints
After creating the Loading Blueprint, you can close the Blueprint Editor and return to your Active Grid. Assign the Repository asset you just created to the Loading Blueprint Repository field on the Active Grid, then navigate to the Groupings Window (accessed via a tab button at the top of the Active Grid inspector window).
You will see a single Grouping and the Loading Blueprint you just created should be assigned to the Loading Blueprint field. If you added more Blueprints and the one you want the Grouping to use is not selected, use the dropdown menu to select the correct Blueprint. This dropdown shows you all Blueprints on the Repository. It's important to give your Blueprints unique names so that you can identify them via this dropdown!
Return To Section Instructions
Like the World, each Active Grid starts with a single Grouping, which should be sufficient for now (unless you are following along using the Sample Scene, in which case see the instructions below). Of course, you are free to add more Groupings, and if you have already added more to your World, you should add the same number of Groupings to your Active Grid. Keep the following in mind for down the road:
1) Each Grouping on the Active Grid (1, 2, 3, etc.) always corresponds to the same numbered World Grouping.
2) The Active Grid can hold more or less Groupings than the World it is synced to. This allows you to add Groupings for all the Worlds you expect the Active Grid to ever be synced to.
3) If an Active Grid has more Groupings than the World it is synced to, the extra Groupings are simply disabled. If it has less, the Active Grid will have no influence on World Cells for the missing Groupings.
At this time, no other settings should need to be adjusted, however if you are interested in the other settings, please remember that all settings with an asterisk (*) in their name have tooltips you can read by hovering over the setting names. You can also find more detailed information about Active Grids within the Active Grids Chapter.
--Sample Scene Directions--
Like with the World, you will need to add three additional Groupings to make a total of four Active Grid Groupings. These Groupings correspond to the same numbered Groupigns on the World, and so we recommend giving each Grouping a name that is related to the Assets used with it.
--Sample Scene Directions--
In general, Groupings with smaller cell sizes will likely need to make use of Loading Blueprints with a greater number of Cells, so you will probably wish to change the Loading Blueprints used by each Grouping at this time. If you duplicated the Samples Blueprint and are using that, you can try using the Standard2D_3x3 Blueprint for the Terrains and Large Structures Groupings, and the Plant2D_5x5 Blueprint for the Plants and Small Objects Groupings