Browse Source

Fixed warnings in Integration Tests Framework in Unity 2017.2

master
Chris Gregan 7 years ago
parent
commit
09fe2313cd
  1. 13
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs

13
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs

@ -63,11 +63,20 @@ namespace UnityTest
EditorApplication.hierarchyWindowChanged += OnHierarchyChangeUpdate; EditorApplication.hierarchyWindowChanged += OnHierarchyChangeUpdate;
EditorApplication.update -= BackgroundSceneChangeWatch; EditorApplication.update -= BackgroundSceneChangeWatch;
EditorApplication.update += BackgroundSceneChangeWatch; EditorApplication.update += BackgroundSceneChangeWatch;
#if UNITY_2017_2_OR_NEWER
EditorApplication.playModeStateChanged -= OnPlaymodeStateChanged;
EditorApplication.playModeStateChanged += OnPlaymodeStateChanged;
#else
EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged; EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged;
EditorApplication.playmodeStateChanged += OnPlaymodeStateChanged; EditorApplication.playmodeStateChanged += OnPlaymodeStateChanged;
#endif
} }
#if UNITY_2017_2_OR_NEWER
private static void OnPlaymodeStateChanged(PlayModeStateChange stateChange)
#else
private static void OnPlaymodeStateChanged() private static void OnPlaymodeStateChanged()
#endif
{ {
if (s_Instance && EditorApplication.isPlaying == EditorApplication.isPlayingOrWillChangePlaymode) if (s_Instance && EditorApplication.isPlaying == EditorApplication.isPlayingOrWillChangePlaymode)
s_Instance.RebuildTestList(); s_Instance.RebuildTestList();
@ -78,7 +87,11 @@ namespace UnityTest
EditorApplication.hierarchyWindowItemOnGUI -= OnHierarchyWindowItemDraw; EditorApplication.hierarchyWindowItemOnGUI -= OnHierarchyWindowItemDraw;
EditorApplication.update -= BackgroundSceneChangeWatch; EditorApplication.update -= BackgroundSceneChangeWatch;
EditorApplication.hierarchyWindowChanged -= OnHierarchyChangeUpdate; EditorApplication.hierarchyWindowChanged -= OnHierarchyChangeUpdate;
#if UNITY_2017_2_OR_NEWER
EditorApplication.playModeStateChanged -= OnPlaymodeStateChanged;
#else
EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged; EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged;
#endif
TestComponent.DestroyAllDynamicTests(); TestComponent.DestroyAllDynamicTests();
} }

Loading…
Cancel
Save