浏览代码

Cloud rendering support (#227)

* Adding support for cloud rendering in the run simulation window

* minor fixes

* minor update
/main
GitHub 4 年前
当前提交
392dcc4d
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15
      com.unity.perception/Editor/Randomization/Editors/RunInUnitySimulationWindow.cs

15
com.unity.perception/Editor/Randomization/Editors/RunInUnitySimulationWindow.cs


Label m_PrevExecutionIdLabel;
RunParameters m_RunParameters;
const string m_SupportedGPUString = "NVIDIA";
[MenuItem("Window/Run in Unity Simulation")]
static void ShowWindow()
{

async void RunInUnitySimulation()
{
#if PLATFORM_CLOUD_RENDERING
if (!m_SysParamDefinitions[m_SysParamIndex].description.Contains(m_SupportedGPUString))
{
EditorUtility.DisplayDialog("Unsupported Sysparam",
"The current selection of the Sysparam " + m_SysParamDefinitions[m_SysParamIndex].description +
" is not supported by this build target. Please select a sysparam with GPU", "Ok");
return;
}
#endif
m_RunParameters = new RunParameters
{
runName = m_RunNameField.value,

{
scenes = new[] { m_RunParameters.currentOpenScenePath },
locationPathName = Path.Combine(projectBuildDirectory, $"{m_RunParameters.runName}.x86_64"),
#if PLATFORM_CLOUD_RENDERING
target = BuildTarget.CloudRendering,
#else
#endif
};
var report = BuildPipeline.BuildPlayer(buildPlayerOptions);
var summary = report.summary;

正在加载...
取消
保存