Skip to content

Commit

Permalink
Fixed a compile warning on Unity 6+
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyTheunissen committed Oct 17, 2024
1 parent cf144e9 commit 9872f02
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Scripts/Editor/SceneViewPickingSceneGui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,11 @@ private static void FindObjectsOfTypeInSceneOrPrefab(Type type, ref List<Object>
}
else
{
#if UNITY_6000_0_OR_NEWER
objects.AddRange(Object.FindObjectsByType(type, FindObjectsSortMode.None));
#else
objects.AddRange(Object.FindObjectsOfType(type));
#endif
}

// Filter out components belonging to the wrong scene.
Expand Down Expand Up @@ -485,7 +489,11 @@ private static void FindGameObjectsInSceneOrPrefab(ref List<Object> @objects)
}
else
{
#if UNITY_6000_0_OR_NEWER
objects.AddRange(Object.FindObjectsByType(typeof(GameObject), FindObjectsSortMode.None));
#else
objects.AddRange(Object.FindObjectsOfType(typeof(GameObject)));
#endif
}

// Filter out components belonging to the wrong scene.
Expand Down

0 comments on commit 9872f02

Please sign in to comment.