This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
ARPlusSystem/ARPlusSystem-250418/Assets/Scripts/Util/DataManager.cs

38 lines
1.5 KiB
C#

using System.Collections.Generic;
using UnityEngine;
namespace Util
{
public class DataManager : MonoBehaviour
{
public GeoDataContainer GeoDataContainer;
private static IReadOnlyDictionary<string, IReadOnlyList<Coords>> _geoDataDictionary;
public static IReadOnlyDictionary<string, IReadOnlyList<Coords>> 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}========================");
// }
}
}
}