This is a bug on the 5.4 version which has been corrected on the main branch in GitHub.
All the code in “PostInitProperties” should have been called instead during “OnRegister” like:
void ULearningAgentsManager::OnRegister()
{
Super::OnRegister();
// Pre-populate the vacant ids
OnEventAgentIds.Reserve(MaxAgentNum);
OccupiedAgentIds.Reserve(MaxAgentNum);
VacantAgentIds.Reserve(MaxAgentNum);
Agents.Reserve(MaxAgentNum);
for (int32 AgentId = MaxAgentNum - 1; AgentId >= 0; AgentId--)
{
VacantAgentIds.Push(AgentId);
Agents.Add(nullptr);
}
UpdateAgentSets();
}
Perhaps you can adjust this locally and your issue will be resolved!
Brendan