-
Notifications
You must be signed in to change notification settings - Fork 24
AI Component
Dizy edited this page Apr 17, 2020
·
20 revisions
The AI Component allow you to transfer contextual information to brain graph Nodes. Moreover it allow you to parameter your AI using the inspector.
To create your own AIComponent you have to inherit from AbstractAIComponent
public class CubeAIComponent : AbstractAIComponent {
// External References
[HideInInspector] public CubeEntity CubeEntity;
public List<CubeEntity> OthersCubeEntities => GameManager.CubeEntities
.Where(entity => entity != CubeEntity).ToList();
private void Awake() {
CubeEntity = GetComponent<CubeEntity>();
}
}
Add the component to any GameObject (prefab or in scene) associated to this AI (an enemy for exemple).
- Utility AI Brain : Here you can add one or more ai brain graph which will be used by the component.
- Time Between Refresh : You can customize the time in second between refresh of the AI brain, the shorter is the most resource intensive.
- Options Resolution : This dropdown allow you to choose between robotic (predictive resolution with always best option picked) or human (randomized pick from best options).