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

@@ -27,7 +27,7 @@ namespace Pathfinding {
} else if (gameObject.scene.name != null) {
// Create a new GUID if there are duplicates in the scene.
// Don't do this if this is a prefab (scene.name == null)
foreach (UnityReferenceHelper urh in FindObjectsOfType(typeof(UnityReferenceHelper)) as UnityReferenceHelper[]) {
foreach (UnityReferenceHelper urh in FindObjectsByType<UnityReferenceHelper>(FindObjectsSortMode.None) as UnityReferenceHelper[]) {
if (urh != this && guid == urh.guid) {
guid = Pathfinding.Util.Guid.NewGuid().ToString();
Debug.Log("Created new GUID - " + guid, this);