Cleanup deprecation warnings in the plugin

This commit is contained in:
Michal Pikulski
2025-09-10 12:56:51 +02:00
parent e0af6b999d
commit 8491b74d5d
8 changed files with 9 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ namespace Pathfinding {
cam = Camera.main;
// Slightly inefficient way of finding all AIs, but this is just an example script, so it doesn't matter much.
// FindObjectsOfType does not support interfaces unfortunately.
ais = FindObjectsOfType<MonoBehaviour>().OfType<IAstarAI>().ToArray();
ais = FindObjectsByType<MonoBehaviour>(FindObjectsSortMode.None).OfType<IAstarAI>().ToArray();
useGUILayout = false;
}