File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Packages/com.unity.render-pipelines.core/Editor/RenderGraph Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -901,6 +901,11 @@ void OnAutoPlayStatusChanged(ChangeEvent<bool> evt)
901901 autoPlayToggle . text = evt . newValue ? L10n . Tr ( "Auto Update" ) : L10n . Tr ( "Pause" ) ;
902902 m_Paused = evt . newValue ;
903903
904+ if ( ! m_Paused && ! m_IsDeviceConnected && m_ConnectedDeviceName != k_EditorName )
905+ {
906+ ConnectDebugSession < RenderGraphEditorLocalDebugSession > ( ) ;
907+ }
908+
904909 UpdateStatusLabel ( ) ;
905910
906911 // Force update when unpausing
@@ -2100,7 +2105,7 @@ void CreateGUI()
21002105 else
21012106 {
21022107 m_ConnectedDeviceName = k_EditorName ;
2103- m_IsDeviceConnected = false ;
2108+ m_IsDeviceConnected = true ;
21042109 }
21052110
21062111 connectionState . Dispose ( ) ; // Dispose it immediately after use
@@ -2157,15 +2162,22 @@ void OnPlayerDisconnected(int playerID)
21572162 }
21582163 }
21592164
2160- ConnectDebugSession < RenderGraphEditorLocalDebugSession > ( ) ;
2165+ if ( ! m_Paused )
2166+ {
2167+ ConnectDebugSession < RenderGraphEditorLocalDebugSession > ( ) ;
2168+ }
2169+ else
2170+ {
2171+ UpdateStatusLabel ( ) ;
2172+ }
21612173 }
21622174
21632175 internal void ConnectDebugSession < TSession > ( )
21642176 where TSession : RenderGraphDebugSession , new ( )
21652177 {
21662178 if ( typeof ( TSession ) == typeof ( RenderGraphEditorLocalDebugSession ) )
21672179 {
2168- if ( ! m_IsDeviceConnected )
2180+ if ( m_ConnectedDeviceName == "Unknown" || m_ConnectedDeviceName == k_EditorName )
21692181 {
21702182 m_ConnectedDeviceName = k_EditorName ;
21712183 m_IsDeviceConnected = true ;
You can’t perform that action at this time.
0 commit comments