Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Editor/MissingScriptsFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
//
// **************************************************************** //

#if !UNITY_2020_OR_NEWER && !UNITY_2020_1_OR_NEWER
using System.Linq;
#endif

using UnityEditor;
using UnityEngine;
using UnityEditor.SceneManagement;
Expand Down Expand Up @@ -42,8 +46,17 @@ private static GameObject[] FindGameObjects(bool includeInactive = true)
: FindObjectsInactive.Exclude;

return Object.FindObjectsByType<GameObject>(inactiveMode, FindObjectsSortMode.InstanceID);
#else
#elif UNITY_2020_OR_NEWER || UNITY_2020_1_OR_NEWER
return Object.FindObjectsOfType<GameObject>(includeInactive);
#else
if (includeInactive)
{
return Resources.FindObjectsOfTypeAll<GameObject>().Cast<GameObject>().ToArray();
}
else
{
return Object.FindObjectsOfType<GameObject>();
}
#endif
}

Expand Down