@@ -115,19 +115,6 @@ private static void SendEditorAnalytic(InputAnalytics.IInputAnalytic analytic)
115115
116116 #endregion
117117
118- private static void UpdateEditorState ( )
119- {
120- if ( InputRuntime . s_Instance is NativeInputRuntime nativeRuntime )
121- {
122- nativeRuntime . m_IsInPlayMode = EditorApplication . isPlaying ;
123- nativeRuntime . m_IsEditorPaused = EditorApplication . isPaused ;
124- nativeRuntime . m_IsEditorActive = InternalEditorUtility . isApplicationActive ;
125- }
126-
127- // Update Editor settings
128- InputSystem . s_Manager . m_AddDevicesNotSupportedByProject = InputEditorUserSettings . addDevicesNotSupportedByProject ;
129- }
130-
131118 private static void RegisterSetupApiUsage ( int api )
132119 {
133120 InputExitPlayModeAnalytic . Register ( ( InputExitPlayModeAnalytic . Api ) api ) ;
@@ -195,8 +182,6 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
195182
196183 EditorApplication . playModeStateChanged += OnEditorPlayModeStateChanged ;
197184 EditorApplication . projectChanged += OnEditorProjectChanged ;
198- //TODO EDITOR CODE SPLIT: this doesn't make sense, needs to be removed
199- EditorApplication . update += UpdateEditorState ;
200185
201186 InputSystem . s_Manager . runtime . onPlayModeChanged = InputSystem . OnPlayModeChange ;
202187 InputSystem . s_Manager . runtime . onProjectChange = InputSystem . OnProjectChange ;
@@ -278,12 +263,9 @@ private static void InitializeEditorHooks()
278263 UnityEngine . InputSystem . UI . InputSystemUIInputModule . s_OnReset = OnUIInputModuleReset ;
279264#endif
280265
281- // TODO EDITOR CODE SPLIT: check this is correct
282- UpdateEditorState ( ) ;
283-
284266 InputActionAsset . s_OnMarkAsDirty = DirtyAssetTracker . TrackDirtyInputActionAsset ;
285267 InputManager . s_GetProjectWideActions = ( ) => ProjectWideActionsBuildProvider . actionsToIncludeInPlayerBuild ;
286- InputSystem . s_Manager . m_AddDevicesNotSupportedByProject = InputEditorUserSettings . addDevicesNotSupportedByProject ;
268+ InputSystem . s_Manager . m_AddDevicesNotSupportedByProject = ( ) => InputEditorUserSettings . addDevicesNotSupportedByProject ;
287269
288270 InputSystem . s_OnPlayModeChangeCallback = change => OnPlayModeChange ( ( PlayModeStateChange ) change ) ;
289271 InputSystem . s_OnProjectChangeCallback = OnProjectChange ;
@@ -300,6 +282,10 @@ private static void InitializeEditorHooks()
300282
301283 if ( InputRuntime . s_Instance is NativeInputRuntime nativeRuntime )
302284 {
285+ nativeRuntime . m_IsInPlayMode = ( ) => EditorApplication . isPlaying ;
286+ nativeRuntime . m_IsEditorPaused = ( ) => EditorApplication . isPaused ;
287+ nativeRuntime . m_IsEditorActive = ( ) => InternalEditorUtility . isApplicationActive ;
288+
303289 nativeRuntime . m_RegisterWantsToQuit = RegisterWantsToQuit ;
304290 nativeRuntime . m_UnregisterWantsToQuit = UnregisterWantsToQuit ;
305291
0 commit comments