浏览代码

Make sure Academy is initialized in ProjectSettingsOverrides.Awake()

/develop/add-fire
GitHub 5 年前
当前提交
9093c796
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs

4
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs


Physics.defaultSolverIterations = solverIterations;
Physics.defaultSolverVelocityIterations = solverVelocityIterations;
// Make sure the Academy singleton is initialized first, since it will create the SideChannels.
var academy = Academy.Instance;
SideChannelUtils.GetSideChannel<FloatPropertiesChannel>().RegisterCallback("gravity", f => { Physics.gravity = new Vector3(0, -f, 0); });
}

Physics.defaultSolverVelocityIterations = m_OriginalSolverVelocityIterations;
}
}
}
}
正在加载...
取消
保存