unreal.LearningAgentsManagerListener
¶
- class unreal.LearningAgentsManagerListener(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
Base class for objects which can be added to a ULearningAgentsManager to receive callbacks whenever agents are added, remove or reset.
C++ Source:
Plugin: LearningAgents
Module: LearningAgents
File: LearningAgentsManagerListener.h
Editor Properties: (see get_editor_property/set_editor_property)
is_setup
(bool): [Read-Only] True if this object has been setup. Otherwise, false.manager
(LearningAgentsManager): [Read-Only] The manager this object is associated with.visual_logger_objects
(Map[Name, LearningAgentsVisualLoggerObject]): [Read-Only] The visual logger objects associated with this listener.
- get_agent(agent_id=-1, agent_class) Object ¶
Gets the agent with the given id from the manager. Calling this from blueprint with the appropriate AgentClass will automatically cast the object to the given type. If not in a blueprint, you should call the manager’s GetAgent methods directly.
- get_agent_manager() LearningAgentsManager ¶
Gets the agent manager associated with this object.
- Return type:
- get_agents(agent_ids, agent_class) Array[Object] ¶
Gets the agents associated with a set of ids from the manager. Calling this from blueprint with the appropriate AgentClass will automatically cast the object to the given type. If not in a blueprint, you should call the manager’s GetAgents method directly.
- get_all_agents(agent_class) -> (out_agents=Array[Object], out_agent_ids=Array[int32])¶
Gets all added agents from the manager. Calling this from blueprint with the appropriate AgentClass will automatically cast the object to the given type.
- on_agents_added(agent_ids) None ¶
Called whenever agents are added to the manager.
- Parameters:
agent_ids (Array[int32]) – Array of agent ids which have been added