Class TrainingAreaReplicator
The Training Ares Replicator allows for a training area object group to be replicated dynamically during runtime.
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
Namespace: Unity.MLAgents.Areas
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 |
numAreas
The number of training areas to replicate.
Declaration
public int numAreas
Field Value
Type | Description |
---|---|
Int32 |
separation
The separation between each training area.
Declaration
public float separation
Field Value
Type | Description |
---|---|
Single |
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()