浏览代码

check agent by agent.enabled

/MLA-1734-demo-provider
Ruo-Ping Dong 4 年前
当前提交
f5ee561f
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 9
      com.unity.ml-agents.extensions/Runtime/Teams/BaseTeamManager.cs

9
com.unity.ml-agents.extensions/Runtime/Teams/BaseTeamManager.cs


{
foreach (var agent in m_Agents)
{
// if (agent.gameObject.activeSelf)
if (agent.gameObject.activeInHierarchy)
if (agent.enabled)
{
agent.EpisodeInterrupted();
}

{
foreach (var agent in m_Agents)
{
if (agent.gameObject.activeInHierarchy)
if (agent.enabled)
{
agent.AddTeamReward(reward);
}

{
foreach (var agent in m_Agents)
{
if (agent.gameObject.activeInHierarchy)
if (agent.enabled)
{
agent.SetTeamReward(reward);
}

{
foreach (var agent in m_Agents)
{
if (agent.gameObject.activeInHierarchy)
if (agent.enabled)
{
agent.EndEpisode();
}

正在加载...
取消
保存