浏览代码

properly shutdown manager instance

/parameter-bahaviours
Steven Leal 4 年前
当前提交
7161dc3e
共有 1 个文件被更改,包括 20 次插入7 次删除
  1. 27
      com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs

27
com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs


using System;
using System.Linq;
using Randomization.ParameterBehaviours;
using Unity.Simulation;
using UnityEngine;
using UnityEngine.Perception.GroundTruth;

static ScenarioBase s_ActiveScenario;
bool m_SkipFrame = true;
bool m_FirstScenarioFrame = true;
bool m_WaitingForFinalUploads = false;
/// <summary>
/// If true, this scenario will quit the Unity application when it's finished executing

return;
}
// Wait for any final uploads before exiting quitting
if (m_WaitingForFinalUploads)
{
if (!Manager.FinalUploadsDone)
return;
if (quitOnComplete)
#if UNITY_EDITOR
UnityEditor.EditorApplication.ExitPlaymode();
#else
Application.Quit();
#endif
return;
}
// Iterate Scenario
if (m_FirstScenarioFrame)
{

{
foreach (var behaviour in ParameterBehaviour.behaviours)
behaviour.OnScenarioComplete();
Manager.Instance.Shutdown();
if (quitOnComplete)
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
m_WaitingForFinalUploads = true;
return;
if (currentIterationFrame == 0)
{
DatasetCapture.StartNewSequence();

正在加载...
取消
保存