|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HideInInspector] |
|
|
|
private Brain[] brains = new Brain[0]; |
|
|
|
private List<Brain> brains = new List<Brain>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resetParameters[kv.key] = kv.value; |
|
|
|
} |
|
|
|
|
|
|
|
brains = gameObject.GetComponentsInChildren<Brain>(); |
|
|
|
GetBrains(gameObject, brains); |
|
|
|
InitializeAcademy(); |
|
|
|
|
|
|
|
foreach (Brain brain in brains) |
|
|
|
|
|
|
public virtual void InitializeAcademy() |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Application.targetFrameRate = inferenceConfiguration.targetFrameRate; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Environment specific step logic.
|
|
|
|
/** |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private static void GetBrains(GameObject gameObject, List<Brain> brains) |
|
|
|
{ |
|
|
|
var transform = gameObject.transform; |
|
|
|
|
|
|
|
for (var i = 0; i < transform.childCount; i++) |
|
|
|
{ |
|
|
|
var child = transform.GetChild(i); |
|
|
|
var brain = child.GetComponent<Brain>(); |
|
|
|
|
|
|
|
if (brain != null) |
|
|
|
brains.Add(brain); |
|
|
|
} |
|
|
|
} |
|
|
|
} |