Navigation
API > API/Plugins > API/Plugins/LearningAgents
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- ALearningAgentsManager
References
| Module | LearningAgents |
| Header | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgents/Public/LearningAgentsManager.h |
| Include | #include "LearningAgentsManager.h" |
Syntax
UCLASS&40;BlueprintType, Blueprintable&41;
class ALearningAgentsManager : public AActor
Remarks
The agent manager is responsible for tracking which game objects are agents. It's the central class around which most of Learning Agents is built.
If you have multiple different types of objects you want controlled by Learning Agents, you should consider creating one agent manager per object type, rather than trying to share an agent manager.
Constructors
| Type | Name | Description | |
|---|---|---|---|
| These constructors/destructors are needed to make forward declarations happy. | |||
ALearningAgentsManager
(
FVTableHelper& Helper |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | Adds the given object as an agent to the manager. | ||
| void | Adds the given objects as an agents to the manager. | ||
| void | AddAgentsAsTickPrerequisiteOfManager
(
const TArray< AActor* >& InAgents |
Adds the given actor objects as tick prerequisite of this manager. | |
| void | AddManagerAsTickPrerequisiteOfAgents
(
const TArray< AActor* >& InAgents |
Tick Prerequisites | |
| UObject * | GetAgent
(
const int32 AgentId, |
Gets the agent with the given id. | |
| UObject * | GetAgent
(
const int32 AgentId |
Gets the agent corresponding to the given id. | |
| const UObject * | GetAgent
(
const int32 AgentId |
Non-blueprint public interface | |
| int32 | GetAgentId
(
UObject* Agent |
Gets the agent id associated with a given agent. | |
| void | GetAgentIds
(
TArray< int32 >& OutAgentIds, |
Gets the agent ids associated with a set of agents. | |
| int32 | GetAgentNum () |
Gets the number of agents added | |
| TConstArrayView< TObjectPtr< UObject > > | GetAgents () |
Get a const array view of this manager's agent objects. | |
| void | Gets the agents associated with a set of ids. | ||
| const TArray< int32 > & | Gets the set of agent ids currently added | ||
| void | GetAllAgents
(
TArray< UObject* >& OutAgents, |
Gets all added agents. | |
| UE::Learning::FIndexSet | Gets the set of agent ids currently added as an FIndexSet | ||
| const TSharedPtr< UE::Learning::FArrayMap > & | Get a const reference to this manager's underlying instance data. | ||
| int32 | Agent Management | ||
| bool | HasAgent
(
const int32 AgentId |
Returns true if the given id is an agent used by the manager; Otherwise, false. | |
| bool | HasAgentObject
(
UObject* Agent |
Returns true if the given object is an agent used by the manager; Otherwise, false. | |
| void | RemoveAgent
(
const int32 AgentId |
Removes the agent with the given id from the manager. | |
| void | RemoveAgents
(
const TArray< int32 >& AgentIds |
Removes the agents with the given ids from the manager. | |
| void | Removes all agents from the manager. | ||
| void | ResetAgent
(
const int32 AgentId |
Resets the agent with the given id on the manager. | |
| void | ResetAgents
(
const TArray< int32 >& AgentIds |
Resets the agents with the given ids on the manager. | |
| void | Resets all the agents on the manager. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |