using System.Collections.Generic; using UnityEngine; using jeanf.propertyDrawer; namespace jeanf.scenemanagement { [ScriptableObjectDrawer] [CreateAssetMenu(fileName = "RegionConnectivity", menuName = "LoadingSystem/RegionConnectivity")] public class RegionConnectivity : ScriptableObject { [Header("Active Regions")] [Tooltip("Regions that are currently active in the scene")] public List activeRegions = new List(); [Header("Landing Zones")] [Tooltip("Landing zones for manual teleportation between regions")] public List landingZones = new List(); public List GetZonesForRegion(Region region) { return region != null ? region.zonesInThisRegion : new List(); } public List GetLandingZonesForAllRegions() { var result = new List(); foreach (var landing in landingZones) { if (landing.landingZone != null) result.Add(landing.landingZone); } return result; } public bool IsRegionActive(Region region) { return activeRegions.Contains(region); } public bool IsLandingZone(Zone zone) { foreach (var landing in landingZones) { if (landing.landingZone == zone) return true; } return false; } } [System.Serializable] public class LandingZoneData { public Region region; public Zone landingZone; } }