using System.Collections.Generic; using UnityEngine; namespace Util { public class DataManager : MonoBehaviour { public GeoDataContainer GeoDataContainer; private static IReadOnlyDictionary> _geoDataDictionary; public static IReadOnlyDictionary> geoDataDictionary => _geoDataDictionary; void Start() { _geoDataDictionary = GeoDataContainer.ToDictionary(); // var geoDatas = geoDataDictionary["CL"]; // foreach (var geoData in geoDatas) // { // foreach (var coords in geoData.coords) // { // Debug.Log($"======================GeoData X: {coords.x}========================"); // Debug.Log($"======================GeoData Y: {coords.y}========================"); // Debug.Log($"======================GeoData Z: {coords.z}========================"); // } // } // foreach (var coords in geoDatas.SelectMany(geoData => geoData.coords)) // { // Debug.Log($"======================GeoData X: {coords.x}========================"); // Debug.Log($"======================GeoData Y: {coords.y}========================"); // Debug.Log($"======================GeoData Z: {coords.z}========================"); // } } } }