浏览代码

update test since in scenario camera no longer skip 1st frame

/0.9.0.preview.1_staging
RuiyuZ 3 年前
当前提交
22551a51
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 8
      com.unity.perception/Tests/Runtime/Randomization/RandomizerTests/RandomizerTests.cs
  2. 2
      com.unity.perception/Tests/Runtime/Randomization/ScenarioTests/ScenarioTests.cs

8
com.unity.perception/Tests/Runtime/Randomization/RandomizerTests/RandomizerTests.cs


}
// TODO: update this function once the perception camera doesn't skip the first frame
IEnumerator CreateNewScenario(int totalIterations, int framesPerIteration)
void CreateNewScenario(int totalIterations, int framesPerIteration)
yield return null; // Skip first frame
// yield return null; // Skip first frame
}
[Test]

[UnityTest]
public IEnumerator OnUpdateExecutesEveryFrame()
{
yield return CreateNewScenario(10, 1);
CreateNewScenario(10, 1);
m_Scenario.AddRandomizer(new ExampleTransformRandomizer());
var transform = m_TestObject.transform;
var initialPosition = Vector3.zero;

[UnityTest]
public IEnumerator OnIterationStartExecutesEveryIteration()
{
yield return CreateNewScenario(10, 2);
CreateNewScenario(10, 2);
m_Scenario.AddRandomizer(new ExampleTransformRandomizer());
var transform = m_TestObject.transform;
var initialRotation = Quaternion.identity;

2
com.unity.perception/Tests/Runtime/Randomization/ScenarioTests/ScenarioTests.cs


}
}
yield return null; // Skip first frame
// yield return null; // Skip first frame
yield return null; // Skip first Update() frame
}

正在加载...
取消
保存