浏览代码

standalone player start rendering from frame 1

/0.9.0.preview.1_staging
RuiyuZ 3 年前
当前提交
79c997e2
共有 2 个文件被更改,包括 1 次插入32 次删除
  1. 19
      com.unity.perception/Runtime/Randomization/Scenarios/PerceptionScenario.cs
  2. 14
      com.unity.perception/Runtime/Randomization/Scenarios/UnitySimulationScenario.cs

19
com.unity.perception/Runtime/Randomization/Scenarios/PerceptionScenario.cs


/// </summary>
MetricDefinition m_IterationMetricDefinition;
/// <summary>
/// The scriptable render pipeline hook used to capture perception data skips the first frame of the simulation
/// when running locally, so this flag is used to track whether the first frame has been skipped yet.
/// </summary>
protected bool m_SkippedFirstFrame;
protected override bool isScenarioReadyToStart
{
get
{
if (!m_SkippedFirstFrame)
{
m_SkippedFirstFrame = true;
return false;
}
return true;
}
}
protected override bool isScenarioReadyToStart => Time.frameCount >= 1;
/// <inheritdoc/>
protected override void OnAwake()

14
com.unity.perception/Runtime/Randomization/Scenarios/UnitySimulationScenario.cs


where T : UnitySimulationScenarioConstants, new()
{
/// <inheritdoc/>
protected override bool isScenarioReadyToStart
{
get
{
if (!Configuration.Instance.IsSimulationRunningInCloud() && !m_SkippedFirstFrame)
{
m_SkippedFirstFrame = true;
return false;
}
return true;
}
}
/// <inheritdoc/>
protected sealed override bool isScenarioComplete => currentIteration >= constants.totalIterations;
/// <inheritdoc/>

正在加载...
取消
保存