mirror of
https://github.com/Kizuren/SynthMaze.git
synced 2025-12-24 00:03:54 +01:00
Updated to Unity6.33f1 and imported updated AStarPath package
This commit is contained in:
parent
46ae47a9f0
commit
ceba0343d3
35 changed files with 9662 additions and 1604 deletions
|
|
@ -29,7 +29,12 @@ 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();
|
||||
// Changed FindObjectsOfType to FindObjectsByType
|
||||
// Use the new FindObjectsByType method to find all MonoBehaviours
|
||||
// Then filter them by the IAstarAI interface
|
||||
ais = FindObjectsByType<MonoBehaviour>(FindObjectsSortMode.None)
|
||||
.OfType<IAstarAI>()
|
||||
.ToArray();
|
||||
useGUILayout = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue