|
|
|
|
|
|
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; |
|
|
|