Skip to content

Utility Agent

Utility Agent is a utility entity with the ability to evaluate all possible decisions and select the best one to execute based on the current situation.

Transforming GameObjects into Utility Agents

To transform a Game Object into a Utility Agent, you need to attach these two components to it:

  1. 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>();
          }
      }
      
  2. 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 Intelligence Data from the Intelligence Asset into the agent, giving it the intelligence to make and execute decisions.
      center|400

If you haven’t already, please consider leaving a review on the Asset Store. Whether good or bad, your feedback helps shape the future of this framework, and lets others determine whether it’s a good fit for their games. Thank you so much!💘 I love you all!🥰


Last update : October 5, 2025
Created : September 1, 2024