Method SetModel
SetModel(string, ModelAsset, InferenceDevice)
Updates the Model assigned to this Agent instance.
Declaration
public void SetModel(string behaviorName, ModelAsset model, InferenceDevice inferenceDevice = InferenceDevice.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | behaviorName | The identifier of the behavior. This will categorize the agent when training. |
| ModelAsset | model | The model to use for inference. |
| InferenceDevice | inferenceDevice | Define the device on which the model will be run. |
Remarks
If the agent already has an assigned model, that model is replaced with the the provided one. However, if you call this function with arguments that are identical to the current parameters of the agent, then no changes are made.
Note: the behaviorName parameter is ignored when not training.
The model and inferenceDevice parameters
are ignored when not using inference.