Advertisement
Pro_Unit

CheckMissingWaypoints

Oct 15th, 2020
936
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. using MalbersAnimations.Controller;
  4. public class CheckMissingWaypoints : MonoBehaviour
  5. {
  6.     [ContextMenu("Check")]
  7.     void Check()
  8.     {
  9.         var waypoints = GameObject.FindObjectsOfType<MWayPoint>();
  10.  
  11.         foreach (var waypoint in waypoints)
  12.         {
  13.             foreach (var target in waypoint.NextTargets)
  14.             {
  15.                 if (target == null)
  16.                 {
  17.                     Debug.Log($"waypoint : {waypoint}", waypoint);
  18.                     break;
  19.                 }
  20.             }
  21.         }
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement