class MAGES::Experimental::EmbodimentJARIA::Agent¶
Overview¶
Class to handle agent behavior. More…
class Agent: public MonoBehaviour { public: // properties FilterMessageDelegate FilterMessage; AgentConfiguration AgentConfiguration; bool Activated; bool CurrentlyInteracting; IBehavior Behavior; List<IBehavior> Behaviors; UnityEvent OnButtonsChange; bool IsMicActive; // methods delegate string FilterMessageDelegate(string message); void EndedSynthesizingSync(bool state); void InitAgent(); void Cancel(); void Update(); async void ExecuteBehavior(string input, bool forceStop = false); void OnDestroy(); };
Detailed Documentation¶
Class to handle agent behavior.
Properties¶
FilterMessageDelegate FilterMessage
Gets or sets the filter function that processes the JARIA response before the voice generation.
AgentConfiguration AgentConfiguration
Gets or sets the agent configuration.
bool Activated
Gets or sets a value indicating whether this agent is activated or not.
bool CurrentlyInteracting
Gets a value indicating whether a user is currently interacting with this agent.
IBehavior Behavior
Gets the agent behaviour.
List<IBehavior> Behaviors
Gets the sub-agents behaviors.
UnityEvent OnButtonsChange
Gets event called when buttons references are updated.
bool IsMicActive
Gets or sets a value indicating whether the microphone is active and the agent is listening.
Methods¶
delegate string FilterMessageDelegate(string message)
A filter function that processes a message and returns a new one.
Parameters:
message |
The original message. |
Returns:
The new filtered message.
void EndedSynthesizingSync(bool state)
Set to end SynthesizingSync.
Parameters:
state |
The state as to end Synthesizing or not. |
void InitAgent()
Initialize the logic of this agent.
void Cancel()
Cancels the interaction with the spawned agent.
void Update()
Continuous update of subs.
async void ExecuteBehavior(string input, bool forceStop = false)
Task to execute the agent’s behavior.
Parameters:
input |
User input. |
forceStop |
Whether the other operations should be forced to stop. |
void OnDestroy()
Called when the component is destroyed.