using System.Collections; using System.Collections.Generic; using UnityEngine; using SiegeSong; namespace SiegeSong { public class LoadingCellManager : MonoBehaviour { public RuntimeManager RuntimeManager; public Transform PlayerTracker; public string CurrentArea; public string CurrentLocale; public string CurrentRegion; void Start() { } void Update() { var hits = Physics.RaycastAll(PlayerTracker.position, -transform.up, 100.0F); foreach (var hit in hits) { var loadingCell = hit.transform.gameObject.GetComponent(); if (loadingCell != null && loadingCell.LocationName != CurrentArea) { CurrentArea = loadingCell.LocationName; RuntimeManager.NotificationManager.Notify($"Now Entering {loadingCell.LocationName}"); } } } } }