Cleanup deprecation warnings in the plugin
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user