Give Page Feedback | API

Upgrading - Custom Primary Cell Object Sub Controllers

The PrimaryCellObjectSubController base abstract class has been renamed to ChunkManager. Any custom Primary Cell Object Sub Controller you have created will need to be recreated using ChunkManager as the class they derive from. You can find this class within the DeepSpaceLabs.SAM namespace.

CreateNewUser (Retained Method)

This method is still present, however its return type and parameter have been adjusted.

The new return type is ChunkManagerUser while the parameter is now called LODGroup and has a type of ILODGroup. The loaderID parameter has also been renamed to chunkStreamerUserID.

AttachCellObjectsToCellsInSingleFrame -> AttachChunksAlreadyInSceneToCellsInSingleFrame

Previously, all logic for Single/Double Frame Asset Chunk Attachment had to be provided for in the AttachCellObjectsToCellsInSingleFrame method. Things have changed slightly; now, the base Chunk Manager class has been preconfigured to try and get the Asset Chunks from the scene (usually these are stored in some kind of pool), and whatever World Cells still need Asset Chunks afterwards are automatically passed to the Chunk Streamer of the LOD Group so that it can stream in new chunks for them.

The AttachChunksAlreadyInSceneToCellsInSingleFrame method can be overridden to provide logic for how the Asset Chunks should be retrieved from the scene. If not overridden, all Asset Chunks will be streamed in anew via the Chunk Streamer.

This new strategy means you should not need to interact directly with the Chunk Streamer in your custom Chunk Manager class!

AttachCellObjectsToCells -> AttachChunksAlreadyInSceneToCells

Previously, all logic for Asynchronous Asset Chunk Attachment had to be provided for in the AttachCellObjectsToCells method. Things have changed slightly; now, the base Chunk Manager class has been preconfigured to try and get the Asset Chunks from the scene (usually these are stored in some kind of pool), and whatever World Cells still need Asset Chunks afterwards are automatically passed to the Chunk Streamer of the LOD Group so that it can stream in new chunks for them.

The AttachChunksAlreadyInSceneToCells method can be overridden to provide logic for how the Asset Chunks should be retrieved from the scene. If not overridden, all Asset Chunks will be streamed in anew via the Chunk Streamer.

This new strategy means you should not need to interact directly with the Chunk Streamer in your custom Chunk Manager class!

DetachAndProcessCellObjectsFromDeactivatedCells -> DetachAndProcessChunksToKeepInScene

Previously, all logic for Asynchronous Asset Chunk Detachment and Unloading had to be provided for in the DetachAndProcessCellObjectsFromDeactivatedCells method. Things have changed slightly; now, the base Chunk Manager class has been preconfigured to try and first keep/store Chunks in the scene (usually these are stored in some kind of pool), and whatever World Cells cannot have their Asset Chunks kept/stored are automatically passed to the Chunk Streamer of the LOD Group so that it can detach and unload their Chunks.

The DetachAndProcessChunksToKeepInScene method can be overridden to provide logic that determines what (if any) Asset Chunks are kept/stored in the scene. If not overridden, all Asset Chunks will be detached and unloaded via the Chunk Streamer (i.e., none will be kept/stored).

This new strategy means you should not need to interact directly with the Chunk Streamer in your custom Chunk Manager class!

Asset Chunks are now responsible for some Asset Chunk related logic, such as setting/getting the chunks' positions and setting the state of the chunks. This allows you to create custom Chunk Managers that can operate on custom Chunk Types that are not normal Unity Game Objects.

These methods have default implementations that assumes the Asset Chunks are Unity Game Objects. If not using Game Objects, you will need to override the methods and provide logic that works for your Chunk Types. The methods include:

GetChunkPosition

SetChunkPosition

SetChunkActiveState

Additional Information

There are some additional properties/methods/concepts regarding Custom Chunk Managers that will not be covered here. If you wish to learn more about these or need other assistance with your Custom Chunk Manager class, please take a look at the Custom Managers Section within the Chunk Managers Chapter.

Custom Chunk Managers