public sealed class AddressableSceneChunkStreamer : AddressableBaseChunkStreamer
An implementation of AddressableBaseChunkStreamer that is able to stream in Addressable Scenes. You cannot override this class, however you can consult this page as a reference if implementing your own custom addressable chunk streamer.
Name | Type | Description |
---|---|---|
FileExtension | string |
Returns .unity which is the file extension for scenes. |
InvalidSceneFormatMessageLevel | InvalidSceneFormatMessageLevel |
Gets or sets the InvalidSceneFormatMessageLevel used by this Async Scene Loader. |
IsSingleFrameAttachmentPreloadRequired | bool |
This property, along with the LoadAndAttachChunksToCellsInSingleFrame method, will throw an InvalidOperationException if queried, so don't! The Addressable System is unable to load scenes in a synchronous manner, therefore use of 'Initialize on Awake' (via the Component Manager) is not allowed, as that will query this Property as well as call the LoadAndAttachChunksToCellsInSingleFrame method. Instead, disable 'Initialize on Awake' and call the InitializeGradually method of the Component Manager manually. |
protected sealed override void AwakeExtended2()
Awake related logic.
protected sealed override AddressableStreamerBaseUser CreateAddressableLoaderUser(ILODGroup LODGroup)
Creates a new AddressableSceneLoaderUser object, which implements behaviour needed to load scene addressable assets.
Name | Type | Description |
---|---|---|
LODGroup | ILODGroup |
The lod group being registered. |
AddressableStreamerBaseUser
A new AddressablePrefabLoaderUser user object created using the LODGroup as input.
public sealed override IEnumerator<YieldInstruction> DetachAndUnloadCellChunksFromCells(List<WorldCell> cells, int userID)
Detaches and unloads the chunks associated with the input world cells over a period of frames using the associated ChunkDestroyer, or GameObject.Destroy if no destroyer is present.
Name | Type | Description |
---|---|---|
cells | List<WorldCell> |
The World Cells whose objects need to be detached and unloaded. |
userID | int |
The ID of the user requesting the unload and detachment. |
IEnumerator<YieldInstruction>
An IEnumerator<YieldInstruction> that can be iterated over or used as a coroutine.
See the
YieldInstruction page for more info.
public sealed override void LoadAndAttachChunksToCellsInSingleFrame(List<WorldCell> cells, int userID)
This method, along with the IsSingleFrameAttachmentPreloadRequired property, will throw an InvalidOperationException if called, so don't! The Addressable System is unable to load scenes in a synchronous manner, therefore use of 'Initialize on Awake' (via the Component Manager) is not allowed, as that will call this method as well as query the IsSingleFrameAttachmentPreloadRequired property. Instead, disable 'Initialize on Awake' and call the InitializeGradually method of the Component Manager manually.
Name | Type | Description |
---|---|---|
cells | List<WorldCell> |
The cells to load and attach |
userID | int |
The ID assigned to the user of this chunk streamer at the time of registration. |
null
Nothing, as it will throw an exception.
Type | Condition |
---|---|
InvalidOperationException | Thrown if the method is called. |
protected sealed override void OnDestroyExtended()
OnDestroy related logic.