Class InstanceModifier
Derive from this class to allow interaction with instances when they are loaded, unloaded or updated.
Inherited Members
Namespace: Unity.Cloud.DataStreaming.Runtime
Assembly: Unity.Cloud.DataStreaming.Runtime.dll
Syntax
public abstract class InstanceModifier
Properties
InstanceUpdater
Allow to change the state of InstanceIds via IInstanceUpdater.SetHighlight(IEnumerable<InstanceId>, UnityEngine.Color32) and IInstanceUpdater.SetVisibility(IEnumerable<InstanceId>, byte).
Declaration
protected IInstanceUpdater InstanceUpdater { get; }
Property Value
Type | Description |
---|---|
IInstanceUpdater |
Methods
LoadAsync(ModelStreamId, IEnumerable<InstanceGeometricErrorState>)
Called each time new InstanceIds are loaded. Happens after Meshes, Materials and Textures are allocated.
Declaration
public virtual Task LoadAsync(ModelStreamId modelStreamId, IEnumerable<InstanceGeometricErrorState> states)
Parameters
Type | Name | Description |
---|---|---|
ModelStreamId | modelStreamId | The owner of the loaded instances. |
IEnumerable<InstanceGeometricErrorState> | states | The loaded instances with their corresponding InstanceGeometricErrorState. |
Returns
Type | Description |
---|---|
Task | Return the executing Task. |
UnloadAsync(ModelStreamId, IEnumerable<InstanceGeometricErrorState>)
Called each time InstanceIds are disposed.
Declaration
public virtual Task UnloadAsync(ModelStreamId modelStreamId, IEnumerable<InstanceGeometricErrorState> states)
Parameters
Type | Name | Description |
---|---|---|
ModelStreamId | modelStreamId | The owner of the unloaded instances. |
IEnumerable<InstanceGeometricErrorState> | states | The instances that have been disposed. |
Returns
Type | Description |
---|---|
Task | Return the executing Task. |
UpdateAsync(ModelStreamId, IEnumerable<InstanceGeometricErrorState>)
Called each time InstanceIds are requested to be updated.
Declaration
public virtual Task UpdateAsync(ModelStreamId modelStreamId, IEnumerable<InstanceGeometricErrorState> states)
Parameters
Type | Name | Description |
---|---|---|
ModelStreamId | modelStreamId | The owner of the updated instances. |
IEnumerable<InstanceGeometricErrorState> | states | The updated instances with their corresponding InstanceGeometricErrorState. |
Returns
Type | Description |
---|---|
Task | Return the executing Task. |