{
[HideInInspector] public bool isSet = false; // Any script can check if the transform is null before using it, by just checking this bool
private PathSO _Path;
public PathSO Path
get { return _Path; }
public class LocationEntrance : MonoBehaviour
[Header("Asset References")]
[SerializeField] private PathSO _entrancePath;
public PathSO EntrancePath => _entrancePath;
}
private void UpdatePathTaken() {
private void UpdatePathTaken()
if (_pathTaken != null)
_pathTaken.Path = _exitPath;
if (pathTaken == null)
return _defaultSpawnIndex;
int index = Array.FindIndex(_spawnLocations, element =>
element?.GetComponent<LocationEntrance>()?.EntrancePath == pathTaken
);