Class TrainingAreaReplicator
The Training Ares Replicator allows for a training area object group to be replicated dynamically during runtime.
Inherited Members
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.MLAgents.Areas
Assembly: Unity.ML-Agents.dll
Syntax
[DefaultExecutionOrder(-5)]
public class TrainingAreaReplicator : MonoBehaviour
Fields
baseArea
The base training area to be replicated.
Declaration
public GameObject baseArea
Field Value
| Type | Description |
|---|---|
| GameObject |
buildOnly
Whether to replicate in the editor or in a build only. Default = true
Declaration
public bool buildOnly
Field Value
| Type | Description |
|---|---|
| bool |
numAreas
The number of training areas to replicate.
Declaration
public int numAreas
Field Value
| Type | Description |
|---|---|
| int |
separation
The separation between each training area.
Declaration
public float separation
Field Value
| Type | Description |
|---|---|
| float |
Properties
GridSize
The size of the computed grid to pack the training areas into.
Declaration
public int3 GridSize { get; }
Property Value
| Type | Description |
|---|---|
| int3 |
TrainingAreaName
The name of the training area.
Declaration
public string TrainingAreaName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Awake()
Called before the simulation begins to computed the grid size for distributing the replicated training areas and set the area name.
Declaration
public void Awake()
OnEnable()
Called after Awake and before the simulation begins and adds the training areas before the Academy begins.
Declaration
public void OnEnable()