Utility Agent
A Utility Agent is a special Utility Entity that helps your AI make the right decision based on the current situation, and controls it to perform the Action Tasks attached to the chosen decision.
Transforming GameObjects into Utility Agents¶
To transform a Game Object into a Utility Agent, you need to attach these two components to it:
-
Utility Agent Facade
- It is similar to Utility Entity Facade but instead of interact with the GameObject of the Utility Entity, it is used to interact with the Game Object of the Utility Agent.
- To create your own Utility Agent Facade, you need to create a class inherited from
UtilityAgentFacade
. For example:
public class Character : UtilityAgentFacade { [SerializeField] private Team team; private CharacterEnergy energy; private CharacterHealth health; private NavMeshAgent navMeshAgent; private Rigidbody rigidBody; public Team Team => team; public NavMeshAgent NavMeshAgent => navMeshAgent; public Rigidbody RigidBody => rigidBody; public CharacterHealth Health => health; public CharacterEnergy Energy => energy; private void Awake() { navMeshAgent = GetComponent<NavMeshAgent>(); rigidBody = GetComponent<Rigidbody>(); health = GetComponent<CharacterHealth>(); energy = GetComponent<CharacterEnergy>(); } }
-
Utility Agent Controller
- It is similar to Utility Entity Controller, but instead of create and manage the lifecycle of the Utility Entity, it creates and manage the lifecycle of the Utility Agent.
- It injects Utility Intelligence Data from the Utility Intelligence Asset into Utility Agent, giving the agent intelligence.
If you like Utility Intelligence, please consider supporting it by leaving a 5-star review on the Asset Store.
Your positive feedback motivates me to keep improving and delivering more updates for this framework.
Thank you so much for your support. I love you all! 🥰

Last update :
September 2, 2024
Created : September 1, 2024
Created : September 1, 2024