43 Commits

Author SHA1 Message Date
a4f78b3a95 build: Update project version 2025-03-24 00:07:35 +08:00
074a58dabd perf: Optimize performance for status view 2025-03-24 00:06:51 +08:00
a2ef175a81 fix: Fix potentially bad formats in culture info 2025-03-24 00:06:29 +08:00
915ba55c2e fix: Correct lifecycle of event listeners 2025-03-24 00:05:35 +08:00
f154a2a468 fix: Fix history list view flashing hard on update 2025-03-24 00:04:29 +08:00
c52d438d40 ci: Update plugins 2025-03-24 00:03:33 +08:00
8d3f53ba13 perf: Improve performance for line renderer 2025-03-20 21:49:28 +08:00
1db25e62e7 fix: Fix wave circle shape when hypocenter is near antimeridian 2025-03-20 21:47:52 +08:00
18312176d9 refactor: Decouple grouping logic from core worker 2025-03-20 17:53:10 +08:00
5be6e32b03 refactor: Pull up map tile cache manager 2025-03-20 17:52:17 +08:00
b33e5ca223 build: Update project version 2025-02-26 15:58:15 +08:00
fe4430b1bf feat: Add new event sources 2025-02-26 15:58:02 +08:00
5a48073152 ci: Update plugins 2025-02-26 15:57:04 +08:00
41c1e6f9fd fix: Fix network events invalidating map view 2025-02-26 15:36:02 +08:00
0743fa45eb fix: Keep ongoing events if present on reported 2025-02-26 15:18:37 +08:00
7f2c0d2e23 fix: Keep ongoing events if present on reported 2025-02-26 15:05:34 +08:00
14202714cc fix: Fix error on polygon elements with holes 2025-02-26 01:20:18 +08:00
ce0c23805a refactor: Remove useless suppressions 2025-02-22 15:39:38 +08:00
75124a4f62 feat: Add assembly version 2025-02-22 00:30:42 +08:00
9193eb9c8c refactor: Cleanup 2025-02-21 21:43:53 +08:00
c0b3449cc8 fix: Fix ongoing event cycling logic (Amend) 2025-02-21 21:43:32 +08:00
d986418927 fix: Suppress verbose event logs 2025-02-21 21:43:09 +08:00
0adea1a325 fix: Remove SeverityColorMapping config 2025-02-21 21:42:28 +08:00
399fb577f3 fix: Modify the cycling duration of ongoing events 2025-02-21 21:41:46 +08:00
c3cd512611 fix: Fix ongoing event cycling logic 2025-02-21 21:40:54 +08:00
f783d45e23 fix: Ensure UpdateTransform is called at most once per frame 2025-02-21 21:38:26 +08:00
04ba735ea6 fix: Improve performance for map tile loading 2025-02-19 21:52:08 +08:00
7bfe335c13 fix: Fix incorrect pooling logic in multi-line renderer 2025-02-19 21:51:31 +08:00
4c812db03a fix: Add missing usings 2025-02-19 21:50:26 +08:00
6ee7a4720c fix: Fix memory leak from instantiated materials in line renderer and polygon renderer 2025-02-19 21:49:38 +08:00
302dc36eba fix: Fix ongoing event cycling logic 2025-02-19 21:48:17 +08:00
3ca96c1a68 feat: Add status view 2025-02-19 21:43:45 +08:00
fbf35c923b refactor: Fix namespace name 2025-02-19 21:42:21 +08:00
b749cf0221 chore: Clear cached font data 2025-02-18 20:48:29 +08:00
5b3a51150c feat: Add config 2025-02-18 12:04:38 +08:00
02fc481993 feat: Set app icon 2025-02-17 21:04:40 +08:00
1d619391c9 feat: Add connecting hint 2025-02-17 20:54:27 +08:00
dad7e703e6 build: Switch build platform 2025-02-17 17:17:47 +08:00
a1f6c4ef94 feat: Generates group views dynamically 2025-02-17 17:17:06 +08:00
a0ded872b3 fix: Fix incorrect iteration when destroying game objects 2025-02-17 17:16:27 +08:00
35b77b044c feat: Add gateway verification 2025-02-16 23:49:20 +08:00
70f4d0ffc3 chore: Add README and licenses to streaming assets 2025-02-16 21:11:55 +08:00
6ead7aa5ce fix: Increase extra map tile zoom level 2025-02-16 20:57:03 +08:00
133 changed files with 2371 additions and 726 deletions

View File

@@ -1,7 +1,7 @@
using System; using System;
using UnityEngine; using UnityEngine;
namespace Utils { namespace Cryville.Common.Unity {
public class PropertyTweener<T> { public class PropertyTweener<T> {
readonly Func<T> _getter; readonly Func<T> _getter;
readonly Action<T> _setter; readonly Action<T> _setter;

View File

@@ -0,0 +1,160 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Cryville.Common.Unity.UI {
public delegate void LoadItemHandler(int index, GameObject gameObject);
[RequireComponent(typeof(RectTransform))]
public class RecyclerView : UIBehaviour {
[SerializeField]
private GameObject m_itemTemplate;
public GameObject ItemTemplate {
get { return m_itemTemplate; }
set { m_itemTemplate = value; /*OnTemplateUpdate();*/ }
}
public LoadItemHandler LoadItem { private get; set; }
public enum Axis {
Horizontal = 0,
Vertical = 1,
}
[SerializeField]
private Axis m_direction;
public Axis Direction {
get { return m_direction; }
set { m_direction = value; /*OnFrameUpdate();*/ }
}
[SerializeField]
RectOffset m_padding;
public RectOffset Padding {
get => m_padding;
set => m_padding = value;
}
[SerializeField]
float m_spacing;
public float Spacing {
get => m_spacing;
set => m_spacing = value;
}
[SerializeField]
private int m_itemCount = 3;
public int ItemCount {
get { return m_itemCount; }
set { m_itemCount = value; /*OnRefresh();*/ }
}
RectTransform _rectTransform;
protected override void Awake() {
_rectTransform = GetComponent<RectTransform>();
}
const float _placeholderLength = 100;
int _firstIndex, _lastIndex;
readonly Stack<GameObject> _pool = new();
void LateUpdate() {
int axis = (int)m_direction;
int sign = m_direction == 0 ? 1 : -1;
float padding = axis == 0 ? m_padding.left : m_padding.top;
if (_rectTransform.parent is not RectTransform parentTransform)
throw new InvalidOperationException("Parent transform is not RectTransform");
Vector2 apos = _rectTransform.anchoredPosition;
float pos = apos[axis] + padding;
float childPos = _firstIndex * _placeholderLength + padding;
float visibleLength = parentTransform.rect.size[axis];
//// Add preceding
//while (_firstIndex > 0 && childPos > pos) {
// var child = Rent();
// child.transform.SetAsFirstSibling();
// LoadItem(--_firstIndex, child);
// pos += GetLength(axis, child.transform) - _placeholderLength;
// childPos -= _placeholderLength;
//}
//// Remove preceding
//while (_firstIndex < _lastIndex) {
// var child = transform.GetChild(0);
// float len = GetLength(axis, child.transform);
// if (childPos + len > pos) break;
// Return(child.gameObject);
// _firstIndex++;
// pos += _placeholderLength - len;
// childPos += _placeholderLength;
//}
//apos[axis] = pos;
//_rectTransform.anchoredPosition = apos;
// Layout existing
int index = _firstIndex;
float layoutToPos = pos + visibleLength;
for (; index < _lastIndex && childPos < layoutToPos; index++) {
var child = (RectTransform)transform.GetChild(index - _firstIndex);
LayoutChild(axis, sign, ref childPos, child);
}
// Remove following
for (; _lastIndex > index; --_lastIndex) {
var child = (RectTransform)transform.GetChild(index - _firstIndex);
Return(child.gameObject);
}
// Add following (and layout)
while (_lastIndex < m_itemCount && childPos < layoutToPos) {
var child = Rent();
if (child.transform is not RectTransform childTransform)
throw new InvalidOperationException("Child transform is not RectTransform");
childTransform.SetSiblingIndex(_lastIndex - _firstIndex);
LoadItem(_lastIndex++, child);
LayoutChild(axis, sign, ref childPos, childTransform);
}
Vector2 gsize = _rectTransform.sizeDelta;
gsize[axis] = childPos + (m_itemCount - _lastIndex) * _placeholderLength + (axis == 0 ? m_padding.horizontal : m_padding.vertical);
_rectTransform.sizeDelta = gsize;
}
static float GetLength(int axis, Transform child) {
if (child is not RectTransform childTransform)
throw new InvalidOperationException("Child transform is not RectTransform");
return LayoutUtility.GetPreferredSize(childTransform, axis);
}
void LayoutChild(int axis, int sign, ref float childPos, RectTransform childTransform) {
Vector2 cpos = childTransform.anchoredPosition;
cpos[axis] = childPos * sign;
cpos[axis ^ 1] = axis == 1 ? m_padding.left : m_padding.top;
childTransform.anchoredPosition = cpos;
Vector2 size = childTransform.sizeDelta;
size[axis ^ 1] = _rectTransform.rect.size[axis ^ 1] - (axis == 1 ? m_padding.horizontal : m_padding.vertical);
childTransform.sizeDelta = size;
childPos += GetLength(axis, childTransform) + m_spacing;
}
GameObject Rent() {
if (_pool.TryPop(out var ret)) {
ret.SetActive(true);
return ret;
}
return Instantiate(m_itemTemplate, transform, false);
}
void Return(GameObject child) {
child.transform.SetAsLastSibling();
child.SetActive(false);
_pool.Push(child);
}
public void InvalidateAll() {
for (; _lastIndex > _firstIndex; --_lastIndex) {
var child = (RectTransform)transform.GetChild(0);
Return(child.gameObject);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1257c1f4490f1d64bb8fc52a9abed1ae
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,11 +1,10 @@
using Cryville.Common.Font; using Cryville.Common.Font;
using Cryville.Common.Unity.UI; using Cryville.Common.Unity.UI;
using Cryville.Crtr;
using Cryville.Culture; using Cryville.Culture;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Xml.Linq;
using System.Xml; using System.Xml;
using System.Xml.Linq;
using UnityEngine; using UnityEngine;
namespace Cryville.EEW.Unity { namespace Cryville.EEW.Unity {

View File

@@ -0,0 +1,3 @@
using System.Reflection;
[assembly: AssemblyVersion("0.0.3")]

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c468580e7742d414e96822c2dfe6e4b4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Cryville.EEW.Unity {
record Config(
string SeverityScheme,
float SeverityColorMappingLuminanceMultiplier,
bool UseContinuousColor,
string ColorScheme,
string OverrideTimeZone,
bool DoDisplayTimeZone,
bool DoSwitchBackToHistory,
IReadOnlyCollection<EventSourceConfig> EventSources
) {
public static Config Default => new(
"Default",
1f,
false,
"Default",
null,
true,
true,
new List<EventSourceConfig> {
new JMAAtomEventSourceConfig(Array.Empty<string>()),
new UpdateCheckerEventSourceConfig(),
new WolfxEventSourceConfig(Array.Empty<string>()),
}
);
}
[JsonPolymorphic(TypeDiscriminatorPropertyName = "Type", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
[JsonDerivedType(typeof(BMKGOpenDataEventSourceConfig), "BMKGOpenData")]
[JsonDerivedType(typeof(CWAOpenDataEventSourceConfig), "CWAOpenData")]
[JsonDerivedType(typeof(EMSCRealTimeEventSourceConfig), "EMSCRealTime")]
[JsonDerivedType(typeof(GlobalQuakeServerEventSourceConfig), "GlobalQuakeServer")]
[JsonDerivedType(typeof(GlobalQuakeServer15EventSourceConfig), "GlobalQuakeServer15")]
[JsonDerivedType(typeof(JMAAtomEventSourceConfig), "JMAAtom")]
[JsonDerivedType(typeof(NOAAEventSourceConfig), "NOAA")]
[JsonDerivedType(typeof(UpdateCheckerEventSourceConfig), "UpdateChecker")]
[JsonDerivedType(typeof(USGSQuakeMLEventSourceConfig), "USGSQuakeML")]
[JsonDerivedType(typeof(WolfxEventSourceConfig), "Wolfx")]
abstract record EventSourceConfig();
record BMKGOpenDataEventSourceConfig([property: JsonRequired] string[] Subtypes) : EventSourceConfig;
record CWAOpenDataEventSourceConfig([property: JsonRequired] string Subtype, [property: JsonRequired] string Token) : EventSourceConfig;
record EMSCRealTimeEventSourceConfig() : EventSourceConfig;
record GlobalQuakeServerEventSourceConfig([property: JsonRequired] string Host, int Port = 38000) : EventSourceConfig;
record GlobalQuakeServer15EventSourceConfig(string Host, int Port = 38000) : GlobalQuakeServerEventSourceConfig(Host, Port);
record JMAAtomEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
record NOAAEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
record UpdateCheckerEventSourceConfig : EventSourceConfig;
record USGSQuakeMLEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
record WolfxEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
[JsonSerializable(typeof(Config))]
[JsonSourceGenerationOptions(WriteIndented = true)]
sealed partial class ConfigSerializationContext : JsonSerializerContext { }
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b478a322f8c49a247b6761de7b5c0e0a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -15,18 +15,22 @@ namespace Cryville.EEW.Unity.Map {
MapElementManager m_layerElementSub; MapElementManager m_layerElementSub;
[SerializeField] [SerializeField]
GameObject m_prefabTile; GameObject m_prefabTile;
[SerializeField]
GameObject m_prefabBitmapHolder;
readonly MapTileCacheManager _tiles = new(); readonly MapTileCacheManager _tiles = new();
float _elementLayerZ; float _elementLayerZ;
void Start() { void Start() {
_camera = GetComponent<Camera>(); _camera = GetComponent<Camera>();
_tiles.ExtraCachedZoomLevel = 20;
_tiles.Parent = m_layerTile; _tiles.Parent = m_layerTile;
_tiles.PrefabTile = m_prefabTile; _tiles.PrefabTile = m_prefabTile;
_tiles.PrefabBitmapHolder = m_prefabBitmapHolder;
_tiles.CacheDir = Application.temporaryCachePath; _tiles.CacheDir = Application.temporaryCachePath;
_camera.orthographicSize = 0.5f / MathF.Max(1, (float)_camera.pixelWidth / _camera.pixelHeight); _camera.orthographicSize = 0.5f / MathF.Max(1, (float)_camera.pixelWidth / _camera.pixelHeight);
_elementLayerZ = m_layerElement.transform.position.z; _elementLayerZ = m_layerElement.transform.position.z;
UpdateTransform(); _mapElementUpdated = true;
} }
void OnDestroy() { void OnDestroy() {
_tiles.Dispose(); _tiles.Dispose();
@@ -39,7 +43,9 @@ namespace Cryville.EEW.Unity.Map {
static readonly Rect _viewportRect = new(0, 0, 1, 1); static readonly Rect _viewportRect = new(0, 0, 1, 1);
Vector3? ppos; Vector3? ppos;
bool _mapElementUpdated;
void Update() { void Update() {
bool flag = false;
var cpos = Input.mousePosition; var cpos = Input.mousePosition;
bool isMouseInViewport = _viewportRect.Contains(_camera.ScreenToViewportPoint(Input.mousePosition)); bool isMouseInViewport = _viewportRect.Contains(_camera.ScreenToViewportPoint(Input.mousePosition));
if (Input.GetMouseButtonDown(0) && isMouseInViewport) { if (Input.GetMouseButtonDown(0) && isMouseInViewport) {
@@ -49,18 +55,25 @@ namespace Cryville.EEW.Unity.Map {
var delta = _camera.ScreenToWorldPoint(pos0) - _camera.ScreenToWorldPoint(cpos); var delta = _camera.ScreenToWorldPoint(pos0) - _camera.ScreenToWorldPoint(cpos);
transform.position += delta; transform.position += delta;
ppos = cpos; ppos = cpos;
UpdateTransform(); flag = true;
} }
if (Input.GetMouseButtonUp(0)) { if (Input.GetMouseButtonUp(0)) {
ppos = null; ppos = null;
} }
if (Input.mouseScrollDelta.y != 0 && isMouseInViewport) { if (Input.mouseScrollDelta.y != 0 && isMouseInViewport) {
Scale *= Mathf.Pow(2, -Input.mouseScrollDelta.y / 8); Scale *= Mathf.Pow(2, -Input.mouseScrollDelta.y / 8);
UpdateTransform(); flag = true;
}
if (_mapElementUpdated) {
_mapElementUpdated = false;
ZoomToMapElement();
flag = true;
}
if (flag) {
UpdateTransform(); // Ensure UpdateTransform is called at most once per frame for tiles to unload correctly
} }
} }
void ZoomToMapElement() {
public void OnMapElementUpdated() {
var aabb = m_layerElement.AABB; var aabb = m_layerElement.AABB;
if (aabb is not RectangleF b) return; if (aabb is not RectangleF b) return;
if (b.Width * _camera.pixelHeight < _camera.pixelWidth * b.Height) if (b.Width * _camera.pixelHeight < _camera.pixelWidth * b.Height)
@@ -70,7 +83,9 @@ namespace Cryville.EEW.Unity.Map {
Scale *= 0.6f; Scale *= 0.6f;
if (Scale < 0.01f) Scale = 0.01f; if (Scale < 0.01f) Scale = 0.01f;
transform.localPosition = new PointF(b.X + b.Width / 2, b.Y + b.Height / 2).ToVector2(); transform.localPosition = new PointF(b.X + b.Width / 2, b.Y + b.Height / 2).ToVector2();
UpdateTransform(); }
public void OnMapElementUpdated() {
_mapElementUpdated = true;
} }
void UpdateTransform() { void UpdateTransform() {

View File

@@ -4,7 +4,7 @@ MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
defaultReferences: [] defaultReferences: []
executionOrder: 0 executionOrder: 5
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:

View File

@@ -98,24 +98,25 @@ namespace Cryville.EEW.Unity.Map.Element {
for (int d = 0; d < 360; d++) { for (int d = 0; d < 360; d++) {
Quaternion q = Quaternion.AngleAxis(d, axis); Quaternion q = Quaternion.AngleAxis(d, axis);
Vector3 p = q * rp; Vector3 p = q * rp;
Vector2 p2 = ToTilePos(p).ToVector2(); AddVertex(renderer, ref lp2, ref segmentIndex, d, p);
if (lp2 != null) {
float dx = p2.x - lp2.Value.x;
if (MathF.Abs(dx) >= 0.5) {
_vertexBuffer[d] = p2.x < 0.5 ? p2 + new Vector2(1, 0) : p2 - new Vector2(1, 0);
renderer.AddSegment(_vertexBuffer, segmentIndex, d - segmentIndex + 1);
segmentIndex = d;
} }
} AddVertex(renderer, ref lp2, ref segmentIndex, 360, rp);
_vertexBuffer[d] = p2;
lp2 = p2;
}
Vector2 rp2 = ToTilePos(rp).ToVector2();
_vertexBuffer[360] = rp2;
renderer.AddSegment(_vertexBuffer, segmentIndex, 361 - segmentIndex); renderer.AddSegment(_vertexBuffer, segmentIndex, 361 - segmentIndex);
} }
renderer.SetMaterial(isHistory ? m_historyMaterial : m_ongoingMaterial); renderer.SetMaterial(isHistory ? m_historyMaterial : m_ongoingMaterial);
} }
void AddVertex(MultiLineRenderer renderer, ref Vector2? lp2, ref int segmentIndex, int d, Vector3 p) {
Vector2 p2 = ToTilePos(p).ToVector2();
if (lp2 != null && MathF.Abs(p2.x - lp2.Value.x) >= 0.5) {
_vertexBuffer[d] = p2.x < 0.5 ? p2 + new Vector2(1, 0) : p2 - new Vector2(1, 0);
renderer.AddSegment(_vertexBuffer, segmentIndex, d - segmentIndex + 1);
segmentIndex = d;
}
_vertexBuffer[d] = p2;
lp2 = p2;
}
static PointF ToTilePos(Vector3 p) => MapTileUtils.WorldToTilePos(new(MathF.Atan2(p.z, p.x) / MathF.PI * 180f, MathF.Asin(p.y) / MathF.PI * 180f)); static PointF ToTilePos(Vector3 p) => MapTileUtils.WorldToTilePos(new(MathF.Atan2(p.z, p.x) / MathF.PI * 180f, MathF.Asin(p.y) / MathF.PI * 180f));
} }
} }

View File

@@ -13,11 +13,16 @@ namespace Cryville.EEW.Unity.Map {
[RequireComponent(typeof(MeshFilter))] [RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))] [RequireComponent(typeof(MeshRenderer))]
class LineRenderer : MonoBehaviour { class LineRenderer : MonoBehaviour {
Material _sharedMaterial;
public Material Material { public Material Material {
get => _meshRenderer.material; get => _meshRenderer.sharedMaterial;
set { set {
_meshRenderer.material = value; if (value == _sharedMaterial) return;
_meshRenderer.material.color = m_color; if (_sharedMaterial != null) Destroy(_meshRenderer.sharedMaterial);
_sharedMaterial = value;
if (_sharedMaterial == null) return;
_meshRenderer.sharedMaterial = Instantiate(_sharedMaterial);
_meshRenderer.sharedMaterial.color = m_color;
} }
} }
@@ -28,7 +33,7 @@ namespace Cryville.EEW.Unity.Map {
set { set {
if (m_color == value) return; if (m_color == value) return;
m_color = value; m_color = value;
_meshRenderer.material.color = value; _meshRenderer.sharedMaterial.color = value;
} }
} }
@@ -126,12 +131,17 @@ namespace Cryville.EEW.Unity.Map {
_meshFilter.mesh = new(); _meshFilter.mesh = new();
} }
_mesh = _meshFilter.mesh; _mesh = _meshFilter.mesh;
_meshRenderer.material.color = m_color; if (_sharedMaterial == null && _meshRenderer.sharedMaterial != null) {
_sharedMaterial = _meshRenderer.sharedMaterial;
_meshRenderer.sharedMaterial = Instantiate(_sharedMaterial);
_meshRenderer.sharedMaterial.color = m_color;
}
} }
void OnDestroy() { void OnDestroy() {
if (_positions is not null) if (_positions is not null)
ArrayPool<Vector2>.Shared.Return(_positions); ArrayPool<Vector2>.Shared.Return(_positions);
Destroy(_mesh); Destroy(_mesh);
Destroy(Material);
} }
void LateUpdate() { void LateUpdate() {
if (_valid) return; if (_valid) return;
@@ -140,12 +150,8 @@ namespace Cryville.EEW.Unity.Map {
_mesh.Clear(); _mesh.Clear();
if (_positions == null) return; if (_positions == null) return;
if (_positionCount <= 1) return; if (_positionCount <= 1) return;
float hw = m_width / 2;
int maxVertexCount = 4 * (_positionCount - 1);
var vbuf = ArrayPool<Vector3>.Shared.Rent(maxVertexCount);
var ubuf = ArrayPool<Vector2>.Shared.Rent(maxVertexCount);
var ibuf = ArrayPool<int>.Shared.Rent(3 * (2 + 4 * (_positionCount - 2)));
float hw = m_width / 2;
int i, vi = 0, ii = 0, li = 0, ri = 1; int i, vi = 0, ii = 0, li = 0, ri = 1;
float uvScale = 1 / (m_tilingScale * m_width); float uvScale = 1 / (m_tilingScale * m_width);
Vector2 p0 = _positions[0], p1 = default; Vector2 p0 = _positions[0], p1 = default;
@@ -153,6 +159,12 @@ namespace Cryville.EEW.Unity.Map {
if ((p1 = _positions[i]) != p0) break; if ((p1 = _positions[i]) != p0) break;
} }
if (i >= _positionCount) return; if (i >= _positionCount) return;
int maxVertexCount = 4 * (_positionCount - 1);
var vbuf = ArrayPool<Vector3>.Shared.Rent(maxVertexCount);
var ubuf = ArrayPool<Vector2>.Shared.Rent(maxVertexCount);
var ibuf = ArrayPool<int>.Shared.Rent(3 * (2 + 4 * (_positionCount - 2)));
Vector2 dp0 = NormalizeSmallVector(p1 - p0), np0 = GetNormal(dp0 * hw); Vector2 dp0 = NormalizeSmallVector(p1 - p0), np0 = GetNormal(dp0 * hw);
vbuf[vi] = p0 - np0; ubuf[vi++] = new(0, 0); vbuf[vi] = p0 - np0; ubuf[vi++] = new(0, 0);
vbuf[vi] = p0 + np0; ubuf[vi++] = new(0, 1); vbuf[vi] = p0 + np0; ubuf[vi++] = new(0, 1);

View File

@@ -1,9 +1,12 @@
using Cryville.EEW.BMKGOpenData.Map;
using Cryville.EEW.Core; using Cryville.EEW.Core;
using Cryville.EEW.CWAOpenData.Map; using Cryville.EEW.CWAOpenData.Map;
using Cryville.EEW.EMSC.Map;
using Cryville.EEW.GlobalQuake.Map; using Cryville.EEW.GlobalQuake.Map;
using Cryville.EEW.JMAAtom.Map; using Cryville.EEW.JMAAtom.Map;
using Cryville.EEW.Map; using Cryville.EEW.Map;
using Cryville.EEW.NOAA.Map; using Cryville.EEW.NOAA.Map;
using Cryville.EEW.QuakeML.Map;
using Cryville.EEW.Report; using Cryville.EEW.Report;
using Cryville.EEW.Wolfx.Map; using Cryville.EEW.Wolfx.Map;
using System.Collections.Generic; using System.Collections.Generic;
@@ -22,6 +25,9 @@ namespace Cryville.EEW.Unity.Map {
readonly List<ReportViewModel> _displayingReports = new(); readonly List<ReportViewModel> _displayingReports = new();
readonly List<int> _displayingOrder = new(); readonly List<int> _displayingOrder = new();
public int Count => _displayingReports.Count;
public int OngoingCount => _displayingReports.Count - (_selected != null ? 1 : 0);
[SerializeField] MapElementManager m_subManager; [SerializeField] MapElementManager m_subManager;
public RectangleF? AABB { public RectangleF? AABB {
@@ -37,25 +43,44 @@ namespace Cryville.EEW.Unity.Map {
return _displayingElements[index].AABB; return _displayingElements[index].AABB;
} }
public void AddOngoing(ReportViewModel e) => Add(e); public void SetSelected(ReportViewModel e, bool forced = false) {
public void RemoveOngoing(ReportViewModel e) => Remove(e); if (e == null) {
public void SetSelected(ReportViewModel e) {
if (_selected is not null)
Remove(_selected); Remove(_selected);
if (e == null || _displayingReports.Contains(e)) {
_selected = null; _selected = null;
return; return;
} }
Add(e); if (_displayingReports.Contains(e)) {
if (forced) return;
Remove(_selected);
_selected = null;
return;
}
if (e.IsExcludedFromHistory)
return;
if (!Add(e))
return;
if (_selected is not null)
Remove(_selected);
_selected = e; _selected = e;
} }
public void SetCurrent(ReportViewModel e) { public bool SetCurrent(ReportViewModel e) {
if (e == null) {
_current = null;
return true;
}
if (!_displayingReports.Contains(e)) {
_current = null;
return false;
}
if (_current == e)
return false;
_current = e; _current = e;
return true;
} }
void Add(ReportViewModel e) { public bool Add(ReportViewModel e) {
var element = Build(e.Model, out _, out int order); var element = Build(e.Model, out _, out int order);
if (element == null) return; if (element == null) return false;
var pos = element.transform.localPosition; var pos = element.transform.localPosition;
pos.z = OrderToZ(_displayingOrder.Sum()); pos.z = OrderToZ(_displayingOrder.Sum());
element.transform.localPosition = pos; element.transform.localPosition = pos;
@@ -64,8 +89,10 @@ namespace Cryville.EEW.Unity.Map {
_displayingOrder.Add(order); _displayingOrder.Add(order);
element.transform.SetParent(transform, false); element.transform.SetParent(transform, false);
if (m_subManager != null) m_subManager.Add(e); if (m_subManager != null) m_subManager.Add(e);
return true;
} }
void Remove(ReportViewModel e) { public void Remove(ReportViewModel e) {
if (_current == e) _current = null;
int index = _displayingReports.IndexOf(e); int index = _displayingReports.IndexOf(e);
if (index == -1) return; if (index == -1) return;
_displayingElements.RemoveAt(index); _displayingElements.RemoveAt(index);
@@ -100,16 +127,19 @@ namespace Cryville.EEW.Unity.Map {
} }
readonly ContextedGeneratorManager<IMapGeneratorContext, MapElement> _gen = new(new IContextedGenerator<IMapGeneratorContext, MapElement>[] { readonly ContextedGeneratorManager<IMapGeneratorContext, MapElement> _gen = new(new IContextedGenerator<IMapGeneratorContext, MapElement>[] {
new BMKGEarthquakeMapGenerator(),
new CENCEarthquakeMapGenerator(), new CENCEarthquakeMapGenerator(),
new CENCEEWMapGenerator(), new CENCEEWMapGenerator(),
new CWAEarthquakeMapGenerator(), new CWAEarthquakeMapGenerator(),
new CWAEEWMapGenerator(), new CWAEEWMapGenerator(),
new CWATsunamiMapGenerator(), new CWATsunamiMapGenerator(),
new EMSCRealTimeEventMapGenerator(),
new FujianEEWMapGenerator(), new FujianEEWMapGenerator(),
new GlobalQuakeMapViewGenerator(), new GlobalQuakeMapViewGenerator(),
new JMAAtomMapGenerator(), new JMAAtomMapGenerator(),
new JMAEEWMapGenerator(), new JMAEEWMapGenerator(),
new NOAAMapGenerator(), new NOAAMapGenerator(),
new QuakeMLEventMapGenerator(),
new SichuanEEWMapGenerator(), new SichuanEEWMapGenerator(),
}); });
public UnityMapElement Build(object e, out CultureInfo culture, out int order) { public UnityMapElement Build(object e, out CultureInfo culture, out int order) {

View File

@@ -1,44 +1,21 @@
using Cryville.EEW.Core.Map; using Cryville.EEW.Core.Map;
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking;
namespace Cryville.EEW.Unity.Map { namespace Cryville.EEW.Unity.Map {
[RequireComponent(typeof(SpriteRenderer))] [RequireComponent(typeof(SpriteRenderer))]
sealed class MapTile : MonoBehaviour { sealed class MapTile : MonoBehaviour {
static readonly SemaphoreSlim _semaphore = new(2);
static readonly HttpClient _httpClient = new() { Timeout = TimeSpan.FromSeconds(10) };
[SerializeField] Transform _idView; [SerializeField] Transform _idView;
public MapTileIndex Index { get; set; } public MapTileIndex Index { get; set; }
public bool IsEmpty { get; private set; }
Action<MapTile> _callback;
SpriteRenderer _renderer; SpriteRenderer _renderer;
UnityWebRequest _req;
DownloadHandlerTexture _texHandler;
Texture2D _tex;
Sprite _sprite;
void Awake() { void Awake() {
_renderer = GetComponent<SpriteRenderer>(); _renderer = GetComponent<SpriteRenderer>();
} }
FileInfo _localFile; public void Init(MapTileIndex index) {
bool _downloadDone;
public void Load(MapTileIndex index, string cacheDir, Action<MapTile> onUpdated) {
Index = index; Index = index;
_callback = onUpdated;
_localFile = new(Path.Combine(cacheDir, $"map/{Index.Z}/{Index.NX}/{Index.NY}"));
float z = 1 << index.Z; float z = 1 << index.Z;
transform.localPosition = new(index.X / z, -(index.Y + 1) / z, -index.Z / 100f); transform.localPosition = new(index.X / z, -(index.Y + 1) / z, -index.Z / 100f);
transform.localScale = new Vector3(1 / z, 1 / z, 1); transform.localScale = new Vector3(1 / z, 1 / z, 1);
@@ -46,70 +23,22 @@ namespace Cryville.EEW.Unity.Map {
byte e = SharedSettings.Instance.IdBytes[((index.X << 2) + index.Y) & 0x1f]; byte e = SharedSettings.Instance.IdBytes[((index.X << 2) + index.Y) & 0x1f];
int ex = e >> 4, ey = e & 0xf; int ex = e >> 4, ey = e & 0xf;
_idView.localPosition = new(ex / 16f, 1 - ey / 16f, -1 / 200f); _idView.localPosition = new(ex / 16f, 1 - ey / 16f, -1 / 200f);
if (_localFile.Exists) {
_downloadDone = true;
}
else {
Task.Run(() => RunAsync($"https://server.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{Index.Z}/{Index.NY}/{Index.NX}"));
}
}
async Task RunAsync(string url) {
await _semaphore.WaitAsync().ConfigureAwait(true);
try {
Directory.CreateDirectory(_localFile.DirectoryName);
using var webStream = await _httpClient.GetStreamAsync(new Uri(url)).ConfigureAwait(true);
using var fileStream = new FileStream(_localFile.FullName, FileMode.Create, FileAccess.Write);
await webStream.CopyToAsync(fileStream).ConfigureAwait(true);
}
finally {
_semaphore.Release();
}
_downloadDone = true;
} }
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")] public void Set(Sprite sprite) {
if (_renderer) {
_renderer.sprite = sprite;
}
}
bool _isDestroyed;
public void Destroy() {
_isDestroyed = true;
}
void Update() { void Update() {
if (_downloadDone) { if (_isDestroyed) {
try { Destroy(gameObject);
_texHandler = new DownloadHandlerTexture(); }
_req = new UnityWebRequest($"file:///{_localFile}") {
downloadHandler = _texHandler,
disposeDownloadHandlerOnDispose = true,
};
_req.SendWebRequest();
}
catch (Exception ex) {
Debug.LogException(ex);
}
_downloadDone = false;
}
if (_req == null || !_req.isDone) return;
if (_texHandler.isDone) {
_tex = _texHandler.texture;
_tex.wrapMode = TextureWrapMode.Clamp;
_sprite = Sprite.Create(_tex, new Rect(0, 0, _tex.width, _tex.height), Vector2.zero, _tex.height);
_renderer.sprite = _sprite;
}
else {
Debug.LogError(_req.error);
_localFile.Delete();
IsEmpty = true;
}
_req.Dispose();
_req = null;
_callback?.Invoke(this);
}
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")]
void OnDestroy() {
if (_req != null) {
_req.Abort();
_req.Dispose();
}
if (_sprite) Destroy(_sprite);
if (_tex) Destroy(_tex);
IsEmpty = true;
_callback?.Invoke(this);
} }
} }
} }

View File

@@ -0,0 +1,35 @@
using Cryville.EEW.Core.Map;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
namespace Cryville.EEW.Unity.Map {
sealed class MapTileBitmapHolder : Core.Map.MapTileBitmapHolder {
MapTileBitmapHolderBehaviour _behaviour;
public MapTileBitmapHolder(MapTileIndex index, GameObject gameObject) : base(index) {
_behaviour = gameObject.GetComponent<MapTileBitmapHolderBehaviour>();
}
protected override void Dispose(bool disposing) {
base.Dispose(disposing);
if (disposing) {
if (_behaviour) _behaviour.Destroy();
}
}
protected override Uri GetUri() =>
new($"https://server.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{Index.Z}/{Index.NY}/{Index.NX}");
protected override Task LoadBitmap(FileInfo file, CancellationToken cancellationToken) {
_behaviour.Load(file);
return Task.CompletedTask;
}
public void Bind(MapTile tile) {
_behaviour.Bind(tile);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f7ad3a3ac7d829249ba21987d585b07f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,79 @@
using System;
using System.IO;
using UnityEngine;
using UnityEngine.Networking;
namespace Cryville.EEW.Unity.Map {
sealed class MapTileBitmapHolderBehaviour : MonoBehaviour {
Action<Sprite> _callback;
public void Bind(MapTile tile) {
if (_isDone)
tile.Set(_sprite);
else
_callback += tile.Set;
}
UnityWebRequest _req;
DownloadHandlerTexture _texHandler;
Texture2D _tex;
Sprite _sprite;
FileInfo _localFile;
bool _isReady;
bool _isDone;
public void Load(FileInfo file) {
_localFile = file;
_isReady = true;
}
void Update() {
if (_isDestroyed) {
Destroy(gameObject);
return;
}
if (_isReady) {
try {
_texHandler = new DownloadHandlerTexture();
_req = new UnityWebRequest($"file:///{_localFile}") {
downloadHandler = _texHandler,
disposeDownloadHandlerOnDispose = true,
};
_req.SendWebRequest();
}
catch (Exception ex) {
Debug.LogException(ex);
}
_isReady = false;
}
if (_req == null || !_req.isDone) return;
if (_texHandler.isDone) {
_tex = _texHandler.texture;
_tex.wrapMode = TextureWrapMode.Clamp;
_sprite = Sprite.Create(_tex, new Rect(0, 0, _tex.width, _tex.height), Vector2.zero, _tex.height, 0, SpriteMeshType.FullRect, Vector4.zero, false);
}
else {
Debug.LogError(_req.error);
_localFile.Delete();
}
_req.Dispose();
_texHandler.Dispose();
_req = null;
_callback?.Invoke(_sprite);
_isDone = true;
}
bool _isDestroyed;
public void Destroy() {
_isDestroyed = true;
}
void OnDestroy() {
if (_req != null) {
_req.Abort();
_req.Dispose();
_texHandler.Dispose();
}
if (_sprite) Destroy(_sprite);
if (_tex) Destroy(_tex);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c17f6b26e9a6bd74e8b2d071c6951c41
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,165 +1,36 @@
using Cryville.EEW.Core.Map; using Cryville.EEW.Core.Map;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using UnityEngine; using UnityEngine;
namespace Cryville.EEW.Unity.Map { namespace Cryville.EEW.Unity.Map {
sealed class TileZOrderComparer : IComparer<MapTileIndex>, IComparer<MapTile> { sealed class MapTileCacheManager : MapTileCacheManager<MapTileBitmapHolder> {
public static readonly TileZOrderComparer Instance = new(); public GameObject PrefabTile { get; set; }
public int Compare(MapTileIndex a, MapTileIndex b) { public GameObject PrefabBitmapHolder { get; set; }
var c = a.Z.CompareTo(b.Z);
if (c != 0) return c;
c = a.Y.CompareTo(b.Y);
if (c != 0) return c;
return a.X.CompareTo(b.X);
}
public int Compare(MapTile a, MapTile b) {
if (a == null) return b == null ? 0 : -1;
if (b == null) return 1;
return Compare(a.Index, b.Index);
}
}
sealed class MapTileCacheManager : IDisposable {
public int ExtraCachedZoomLevel { get; set; } = 2;
GameObject m_prefabTile;
public GameObject PrefabTile {
get => m_prefabTile;
set {
m_prefabTile = value;
if (_dummyTask) GameObject.Destroy(_dummyTask.gameObject);
_dummyTask = GameObject.Instantiate(m_prefabTile, Parent, false).GetComponent<MapTile>();
}
}
public Transform Parent { get; set; } public Transform Parent { get; set; }
public string CacheDir { get; set; } public string CacheDir { get; set; }
public event Action Updated; protected override MapTileBitmapHolder CreateBitmapHolder(MapTileIndex index) => new(index, GameObject.Instantiate(PrefabBitmapHolder, Parent, false));
void OnUpdated(MapTile tile) {
if (tile.IsEmpty) { protected override string GetCacheFilePath(MapTileIndex index) => Path.Combine(CacheDir, $"map/{index.Z}/{index.NX}/{index.NY}");
lock (ActiveTiles) {
if (_cache.Remove(tile.Index)) { readonly Dictionary<MapTile<MapTileBitmapHolder>, MapTile> _map = new();
ActiveTiles.RemoveAt(ActiveTiles.BinarySearch(tile, TileZOrderComparer.Instance)); protected override void OnTileCreated(MapTile<MapTileBitmapHolder> tile) {
} base.OnTileCreated(tile);
} var gameObject = GameObject.Instantiate(PrefabTile, Parent, false);
} var uTile = gameObject.GetComponent<MapTile>();
Updated?.Invoke(); _map.Add(tile, uTile);
uTile.Init(tile.Index);
tile.BitmapHolder.Bind(uTile);
} }
public void Dispose() { protected override void OnTileDestroyed(MapTile<MapTileBitmapHolder> tile) {
MonoBehaviour.Destroy(_dummyTask); base.OnTileDestroyed(tile);
if (_map.TryGetValue(tile, out var uTile)) {
lock (ActiveTiles) { uTile.Destroy();
foreach (var task in ActiveTiles) _map.Remove(tile);
GameObject.Destroy(task.gameObject);
ActiveTiles.Clear();
_cache.Clear();
}
}
readonly Dictionary<MapTileIndex, MapTile> _cache = new();
public List<MapTile> ActiveTiles { get; } = new();
MapTileIndex _a, _b;
public void MoveTo(MapTileIndex a, MapTileIndex b) {
if (a.Z != b.Z) throw new ArgumentException("Mismatched Z index.");
if (a.X >= b.X || a.Y >= b.Y) throw new ArgumentException("Incorrect relative X/Y index.");
lock (ActiveTiles) {
UnloadTiles(a, b);
_a = a; _b = b;
LoadTiles(a, b);
}
}
void LoadTiles(MapTileIndex a, MapTileIndex b) {
for (int z = Math.Max(0, a.Z - ExtraCachedZoomLevel); z <= Math.Max(0, a.Z); z++) {
var ia = a.ZoomToLevel(z, Math.Floor);
var ib = b.ZoomToLevel(z, Math.Ceiling);
for (int x = ia.X; x < ib.X; x++) {
for (int y = ia.Y; y < ib.Y; y++) {
var index = new MapTileIndex(x, y, z);
if (_cache.ContainsKey(index)) continue;
var task = GameObject.Instantiate(PrefabTile, Parent, false).GetComponent<MapTile>();
task.Load(index, CacheDir, OnUpdated);
_cache.Add(index, task);
var i = ~ActiveTiles.BinarySearch(task, TileZOrderComparer.Instance);
ActiveTiles.Insert(i, task);
}
}
}
}
void UnloadTiles(MapTileIndex a, MapTileIndex b) {
if (a.Z != _a.Z) {
for (int z = _a.Z - ExtraCachedZoomLevel; z < a.Z - ExtraCachedZoomLevel; z++) UnloadTilesAtZoomLevel(z);
for (int z = a.Z + 1; z <= _a.Z; z++) UnloadTilesAtZoomLevel(z);
}
if (a.X > _a.X) {
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
var ia0 = _a.ZoomToLevel(z, Math.Floor);
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
var ia1 = a.ZoomToLevel(z, Math.Floor);
if (ia0.X == ia1.X) break;
UnloadTilesInRegion(ia0.X, ia0.Y, ia1.X, ib0.Y, z);
}
}
if (b.X < _b.X) {
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
var ia0 = _a.ZoomToLevel(z, Math.Floor);
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
var ib1 = b.ZoomToLevel(z, Math.Ceiling);
if (ib0.X == ib1.X) break;
UnloadTilesInRegion(ib1.X, ia0.Y, ib0.X, ib0.Y, z);
}
}
if (a.Y > _a.Y) {
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
var ia0 = _a.ZoomToLevel(z, Math.Floor);
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
var ia1 = a.ZoomToLevel(z, Math.Floor);
if (ia0.Y == ia1.Y) break;
UnloadTilesInRegion(ia0.X, ia0.Y, ib0.X, ia1.Y, z);
}
}
if (b.Y < _b.Y) {
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
var ia0 = _a.ZoomToLevel(z, Math.Floor);
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
var ib1 = b.ZoomToLevel(z, Math.Ceiling);
if (ib0.Y == ib1.Y) break;
UnloadTilesInRegion(ia0.X, ib1.Y, ib0.X, ib0.Y, z);
}
}
}
void UnloadTilesInRegion(int x1, int y1, int x2, int y2, int z) {
for (int x = x1; x < x2; x++) {
for (int y = y1; y < y2; y++) {
var index = new MapTileIndex(x, y, z);
if (!_cache.TryGetValue(index, out var task)) continue;
GameObject.Destroy(task.gameObject);
}
}
}
MapTile _dummyTask;
void UnloadTilesAtZoomLevel(int z) {
if (z < 0) return;
_dummyTask.Index = new(int.MinValue, int.MinValue, z);
var i0 = ActiveTiles.BinarySearch(_dummyTask, TileZOrderComparer.Instance);
if (i0 < 0) i0 = ~i0;
_dummyTask.Index = new(int.MinValue, int.MinValue, z + 1);
var i1 = ActiveTiles.BinarySearch(_dummyTask, TileZOrderComparer.Instance);
if (i1 < 0) i1 = ~i1;
for (var i = i1 - 1; i >= i0; --i) {
var index = ActiveTiles[i].Index;
if (!_cache.TryGetValue(index, out var task)) continue;
GameObject.Destroy(task.gameObject);
} }
} }
} }

View File

@@ -48,11 +48,13 @@ namespace Cryville.EEW.Unity.Map {
_segments.Add(segment = Instantiate(m_lineRendererPrefab, transform, false).GetComponent<LineRenderer>()); _segments.Add(segment = Instantiate(m_lineRendererPrefab, transform, false).GetComponent<LineRenderer>());
} }
else { else {
segment = _segments[_segmentIndex++]; segment = _segments[_segmentIndex];
segment.gameObject.SetActive(true); segment.gameObject.SetActive(true);
} }
_segmentIndex++;
segment.SetPositions(positions, index, length); segment.SetPositions(positions, index, length);
segment.Width = m_width; segment.Width = m_width;
segment.TilingScale = m_tilingScale;
} }
public void Clear() { public void Clear() {
for (int i = 0; i < _segmentIndex; i++) { for (int i = 0; i < _segmentIndex; i++) {

View File

@@ -11,11 +11,16 @@ namespace Cryville.EEW.Unity.Map {
[RequireComponent(typeof(MeshFilter))] [RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))] [RequireComponent(typeof(MeshRenderer))]
class PolygonRenderer : MonoBehaviour { class PolygonRenderer : MonoBehaviour {
Material _sharedMaterial;
public Material Material { public Material Material {
get => _meshRenderer.material; get => _meshRenderer.sharedMaterial;
set { set {
_meshRenderer.material = value; if (value == _sharedMaterial) return;
_meshRenderer.material.color = m_color; if (_sharedMaterial != null) Destroy(_meshRenderer.sharedMaterial);
_sharedMaterial = value;
if (_sharedMaterial == null) return;
_meshRenderer.sharedMaterial = Instantiate(_sharedMaterial);
_meshRenderer.sharedMaterial.color = m_color;
} }
} }
@@ -40,10 +45,15 @@ namespace Cryville.EEW.Unity.Map {
_meshFilter.mesh = new(); _meshFilter.mesh = new();
} }
_mesh = _meshFilter.mesh; _mesh = _meshFilter.mesh;
_meshRenderer.material.color = m_color; if (_sharedMaterial == null && _meshRenderer.sharedMaterial != null) {
_sharedMaterial = _meshRenderer.sharedMaterial;
_meshRenderer.sharedMaterial = Instantiate(_sharedMaterial);
_meshRenderer.sharedMaterial.color = m_color;
}
} }
void OnDestroy() { void OnDestroy() {
Destroy(_mesh); Destroy(_mesh);
Destroy(Material);
} }
public void SetPolygon(IEnumerable<IEnumerable<PointF>> polygon) { public void SetPolygon(IEnumerable<IEnumerable<PointF>> polygon) {
_mesh.Clear(); _mesh.Clear();
@@ -67,7 +77,13 @@ namespace Cryville.EEW.Unity.Map {
DTSweep.Triangulate(tcx); DTSweep.Triangulate(tcx);
var codeToIndex = new Dictionary<uint, int>(); var codeToIndex = new Dictionary<uint, int>();
var vertices = ArrayPool<Vector3>.Shared.Rent(convertedPolygon.Points.Count); int vertexCount = convertedPolygon.Points.Count;
if (convertedPolygon.Holes != null) {
foreach (var hole in convertedPolygon.Holes) {
vertexCount += hole.Points.Count;
}
}
var vertices = ArrayPool<Vector3>.Shared.Rent(vertexCount);
var triangles = ArrayPool<int>.Shared.Rent(convertedPolygon.Triangles.Count * 3); var triangles = ArrayPool<int>.Shared.Rent(convertedPolygon.Triangles.Count * 3);
int vi = 0, ii = 0; int vi = 0, ii = 0;
foreach (var tri in convertedPolygon.Triangles) { foreach (var tri in convertedPolygon.Triangles) {

View File

@@ -1,7 +1,8 @@
using Cryville.Common.Font; using Cryville.Common.Font;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine;
namespace Cryville.Crtr { namespace Cryville.EEW.Unity {
internal static class PlatformConfig { internal static class PlatformConfig {
#if UNITY_STANDALONE_WIN #if UNITY_STANDALONE_WIN
public static readonly string Name = "windows"; public static readonly string Name = "windows";
@@ -11,11 +12,17 @@ namespace Cryville.Crtr {
#error Unknown platform. #error Unknown platform.
#endif #endif
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
#if UNITY_EDITOR_WIN
public static readonly string ConfigPath = Application.persistentDataPath;
#else
public static readonly string ConfigPath = Application.dataPath;
#endif
public static readonly string FileProtocolPrefix = "file:///"; public static readonly string FileProtocolPrefix = "file:///";
public static readonly FontManager FontManager = new FontManagerWindows(); public static readonly FontManager FontManager = new FontManagerWindows();
public static Dictionary<string, List<string>> ScriptFontMap => FallbackListFontMatcher.GetDefaultWindowsFallbackMap(); public static Dictionary<string, List<string>> ScriptFontMap => FallbackListFontMatcher.GetDefaultWindowsFallbackMap();
public static readonly string TextShader = "TextMesh Pro/Shaders/TMP_SDF SSD"; public static readonly string TextShader = "TextMesh Pro/Shaders/TMP_SDF SSD";
#elif UNITY_ANDROID #elif UNITY_ANDROID
public static readonly string ConfigPath = Application.persistentDataPath;
public static readonly string FileProtocolPrefix = "file://"; public static readonly string FileProtocolPrefix = "file://";
public static readonly FontManager FontManager = new FontManagerAndroid(); public static readonly FontManager FontManager = new FontManagerAndroid();
public static Dictionary<string, List<string>> ScriptFontMap => FallbackListFontMatcher.GetDefaultAndroidFallbackMap(); public static Dictionary<string, List<string>> ScriptFontMap => FallbackListFontMatcher.GetDefaultAndroidFallbackMap();

View File

@@ -5,7 +5,12 @@ using Cryville.EEW.Map;
using Cryville.EEW.Report; using Cryville.EEW.Report;
using Cryville.EEW.TTS; using Cryville.EEW.TTS;
using System; using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text.Json;
using UnityEngine; using UnityEngine;
using Color = System.Drawing.Color; using Color = System.Drawing.Color;
@@ -14,19 +19,98 @@ namespace Cryville.EEW.Unity {
static SharedSettings s_instance; static SharedSettings s_instance;
public static SharedSettings Instance => s_instance ??= new(); public static SharedSettings Instance => s_instance ??= new();
public ISeverityScheme SeverityScheme => DefaultSeverityScheme.Instance; public ISeverityScheme SeverityScheme { get; private set; } = DefaultSeverityScheme.Instance;
public ISeverityColorMapping SeverityColorMapping => DefaultSeverityColorMapping.Instance; public ISeverityColorMapping SeverityColorMapping { get; private set; } = DefaultSeverityColorMapping.Instance;
public bool UseContinuousColor => true; public bool UseContinuousColor { get; private set; } = true;
public IColorScheme ColorScheme => new SeverityBasedColorScheme(SeverityScheme, DefaultSeverityColorMapping.Instance); public IColorScheme ColorScheme { get; private set; } = new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.Instance);
public ISubColorScheme BorderColorScheme => new WrappedColorScheme(new SeverityBasedColorScheme(SeverityScheme, DefaultSeverityColorMapping.SecondaryInstance)); public ISubColorScheme BorderColorScheme { get; private set; } = new WrappedColorScheme(new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.SecondaryInstance));
public ISubColorScheme TextColorScheme => new DefaultTextColorScheme(Color.White, Color.Black); public ISubColorScheme TextColorScheme { get; private set; } = new DefaultTextColorScheme(Color.White, Color.Black);
public ILocationConverter LocationConverter => new FERegionLongConverter(); public ILocationConverter LocationConverter => new FERegionLongConverter(); // TODO TTS
public TimeSpan NowcastWarningDelayTolerance => TimeSpan.MaxValue; public TimeSpan NowcastWarningDelayTolerance => TimeSpan.FromMinutes(60); // TODO TTS
public TimeZoneInfo OverrideTimeZone { get; private set; }
public bool DoDisplayTimeZone { get; private set; } = true;
public bool DoSwitchBackToHistory { get; private set; } = true;
public IReadOnlyCollection<EventSourceConfig> EventSources { get; private set; }
public string Id { get; private set; }
public byte[] IdBytes { get; } = new byte[32]; public byte[] IdBytes { get; } = new byte[32];
public string UnityUserAgent { get; private set; }
public void Init() { public void Init() {
Id = SystemInfo.deviceUniqueIdentifier;
using var hash = SHA256.Create(); using var hash = SHA256.Create();
hash.ComputeHash(EEW.SharedSettings.Encoding.GetBytes(SystemInfo.deviceUniqueIdentifier)).CopyTo(IdBytes, 0); hash.ComputeHash(EEW.SharedSettings.Encoding.GetBytes(Id)).CopyTo(IdBytes, 0);
#if UNITY_STANDALONE_WIN
UnityUserAgent = string.Format(
CultureInfo.InvariantCulture,
"{0} CysTerraUnity/{1} (Windows NT {2}; {3})",
EEW.SharedSettings.UserAgent,
Application.version,
Environment.OSVersion.Version,
RuntimeInformation.OSArchitecture.ToString().ToLowerInvariant()
);
#else
#error No Unity User Agent
#endif
var file = new FileInfo(Path.Combine(PlatformConfig.ConfigPath, "config.json"));
if (!file.Exists) {
using var stream1 = file.OpenWrite();
using var writer = new StreamWriter(stream1, EEW.SharedSettings.Encoding);
writer.Write(JsonSerializer.Serialize(Config.Default, ConfigSerializationContext.Default.Config));
}
using var stream = file.OpenRead();
var config = JsonSerializer.Deserialize(stream, ConfigSerializationContext.Default.Config) ?? throw new InvalidOperationException("Null config.");
SeverityScheme = config.SeverityScheme switch {
"Default" => new DefaultSeverityScheme(),
"Legacy" => new LegacySeverityScheme(),
_ => throw new InvalidOperationException("Unknown severity scheme."),
};
SeverityColorMapping = config.ColorScheme switch {
"Default" => new DefaultSeverityColorMapping(config.SeverityColorMappingLuminanceMultiplier),
"SREV" => new SREVSeverityColorMapping(config.SeverityColorMappingLuminanceMultiplier),
"DichromaticYB" => new DichromaticSeverityColorMapping(0.62f, 0.20f, 90, config.SeverityColorMappingLuminanceMultiplier),
"DichromaticRC" => new DichromaticSeverityColorMapping(0.62f, 0.25f, 30, config.SeverityColorMappingLuminanceMultiplier),
"DichromaticPG" => new DichromaticSeverityColorMapping(0.62f, 0.30f, -30, config.SeverityColorMappingLuminanceMultiplier),
"Monochromatic" => new MonochromaticSeverityColorMapping(config.SeverityColorMappingLuminanceMultiplier),
_ => throw new InvalidOperationException("Unknown color scheme."),
};
UseContinuousColor = config.UseContinuousColor;
ColorScheme = config.ColorScheme switch {
"Default" => new SeverityBasedColorScheme(SeverityScheme, DefaultSeverityColorMapping.Instance),
"SREV" => new SREVColorScheme(),
"DichromaticYB" => new SeverityBasedColorScheme(SeverityScheme, new DichromaticSeverityColorMapping(0.62f, 0.20f, 90)),
"DichromaticRC" => new SeverityBasedColorScheme(SeverityScheme, new DichromaticSeverityColorMapping(0.62f, 0.25f, 30)),
"DichromaticPG" => new SeverityBasedColorScheme(SeverityScheme, new DichromaticSeverityColorMapping(0.62f, 0.30f, -30)),
"Monochromatic" => new SeverityBasedColorScheme(SeverityScheme, new MonochromaticSeverityColorMapping()),
_ => throw new InvalidOperationException("Unknown color scheme."),
};
BorderColorScheme = config.ColorScheme switch {
"Default" => new WrappedColorScheme(new SeverityBasedColorScheme(SeverityScheme, DefaultSeverityColorMapping.SecondaryInstance)),
"SREV" => new WrappedColorScheme(new SREVBorderColorScheme()),
"DichromaticYB" => new WrappedColorScheme(new SeverityBasedColorScheme(SeverityScheme, new DichromaticSeverityColorMapping(0.62f, 0.20f, 90, 0.75f))),
"DichromaticRC" => new WrappedColorScheme(new SeverityBasedColorScheme(SeverityScheme, new DichromaticSeverityColorMapping(0.62f, 0.25f, 30, 0.75f))),
"DichromaticPG" => new WrappedColorScheme(new SeverityBasedColorScheme(SeverityScheme, new DichromaticSeverityColorMapping(0.62f, 0.30f, -30, 0.75f))),
"Monochromatic" => new WrappedColorScheme(new SeverityBasedColorScheme(SeverityScheme, new MonochromaticSeverityColorMapping(0.75f))),
_ => throw new InvalidOperationException("Unknown color scheme."),
};
TextColorScheme = config.ColorScheme switch {
"SREV" => new DefaultTextColorScheme(Color.White, Color.FromArgb(28, 28, 28), 0.555f),
_ => new DefaultTextColorScheme(Color.White, Color.Black),
};
OverrideTimeZone = ParseTimeZone(config.OverrideTimeZone);
DoDisplayTimeZone = config.DoDisplayTimeZone;
DoSwitchBackToHistory = config.DoSwitchBackToHistory;
EventSources = config.EventSources;
}
TimeZoneInfo ParseTimeZone(string timeZone) {
if (timeZone == null) return null;
if (timeZone == "") return TimeZoneInfo.Local;
return TimeZoneInfo.CreateCustomTimeZone("Custom", TimeSpan.Parse(timeZone, CultureInfo.InvariantCulture), null, null);
} }
} }
} }

View File

@@ -39,18 +39,15 @@ namespace Cryville.EEW.Unity.UI {
SetText(m_locationView, location.Value, location.Culture); SetText(m_locationView, location.Value, location.Culture);
SetText(m_predicateView, predicate.Value, predicate.Culture); SetText(m_predicateView, predicate.Value, predicate.Culture);
if (time.Value is DateTime ttime) { if (time.Value is DateTime ttime) {
// TODO if (SharedSettings.Instance.OverrideTimeZone is TimeZoneInfo tTimeZone)
//if (SharedSettings.Instance.OverrideTimeZone is TimeZoneInfo tTimeZone) ttime = TimeZoneInfo.ConvertTime(ttime, timeZone, tTimeZone);
// ttime = TimeZoneInfo.ConvertTime(ttime, timeZone, tTimeZone); else
//else tTimeZone = timeZone;
// tTimeZone = timeZone;
TimeZoneInfo tTimeZone = timeZone;
if (UseShortTimeFormat) { if (UseShortTimeFormat) {
SetText(m_timeView, ttime.ToString("G", time.Culture), time.Culture); SetText(m_timeView, ttime.ToString("G", time.Culture), time.Culture);
} }
else { else {
// TODO SetText(m_timeView, SharedSettings.Instance.DoDisplayTimeZone ? string.Format(time.Culture, "{0:G} ({1})", ttime, tTimeZone.ToTimeZoneString()) : ttime.ToString(time.Culture), time.Culture); SetText(m_timeView, SharedSettings.Instance.DoDisplayTimeZone ? string.Format(time.Culture, "{0:G} ({1})", ttime, tTimeZone.ToTimeZoneString()) : ttime.ToString(time.Culture), time.Culture);
SetText(m_timeView, string.Format(time.Culture, "{0:G} ({1})", ttime, tTimeZone.ToTimeZoneString()), time.Culture);
} }
} }
else { else {

View File

@@ -1,11 +1,19 @@
using Cryville.Common.Unity.UI;
using Cryville.EEW.Core; using Cryville.EEW.Core;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace Cryville.EEW.Unity.UI { namespace Cryville.EEW.Unity.UI {
[RequireComponent(typeof(RecyclerView))]
class EventGroupListView : MonoBehaviour { class EventGroupListView : MonoBehaviour {
[SerializeField] RecyclerView _recyclerView;
EventGroupView m_prefabEventGroupView; void Awake() {
_recyclerView = GetComponent<RecyclerView>();
_recyclerView.LoadItem = LoadItem;
}
void LoadItem(int index, GameObject gameObject) {
gameObject.GetComponent<EventGroupView>().Set(_groups[^(index + 1)]);
}
readonly List<ReportGroup> _groups = new(); readonly List<ReportGroup> _groups = new();
public void UpdateGroup(ReportGroup e) { public void UpdateGroup(ReportGroup e) {
@@ -17,19 +25,16 @@ namespace Cryville.EEW.Unity.UI {
} }
void Add(ReportGroup group) { void Add(ReportGroup group) {
_groups.Add(group); _groups.Add(group);
var child = Instantiate(m_prefabEventGroupView); _recyclerView.ItemCount++;
child.Set(group); _recyclerView.InvalidateAll();
child.transform.SetParent(transform, false);
child.transform.SetSiblingIndex(0);
} }
void Remove(ReportGroup group) { void Remove(ReportGroup group) {
int index = _groups.LastIndexOf(group); int index = _groups.LastIndexOf(group);
if (index == -1) return; if (index == -1) return;
_groups.RemoveAt(index); _groups.RemoveAt(index);
var child = transform.GetChild(_groups.Count - index); --_recyclerView.ItemCount;
child.SetParent(null, false); _recyclerView.InvalidateAll();
Destroy(child.gameObject);
} }
} }
} }

View File

@@ -14,9 +14,12 @@ namespace Cryville.EEW.Unity.UI {
[SerializeField] GameObject m_listViewRail; [SerializeField] GameObject m_listViewRail;
[SerializeField] GameObject m_expander; [SerializeField] GameObject m_expander;
void Start() { void OnEnable() {
m_groupHeader.onClick.AddListener(OnGroupHeaderClicked); m_groupHeader.onClick.AddListener(OnGroupHeaderClicked);
} }
void OnDisable() {
m_groupHeader.onClick.RemoveListener(OnGroupHeaderClicked);
}
void OnGroupHeaderClicked() { void OnGroupHeaderClicked() {
SetExpanded(!m_listViewContainer.activeSelf); SetExpanded(!m_listViewContainer.activeSelf);
} }

View File

@@ -79,14 +79,15 @@ namespace Cryville.EEW.Unity.UI {
m_currentView.SetViewModel(e, true); m_currentView.SetViewModel(e, true);
var keyProp = e.Properties.FirstOrDefault(); var keyProp = e.Properties.FirstOrDefault();
_displayingViews[_index].SetCurrent(true); _displayingViews[_index].SetCurrent(true);
_tickDown = Math.Max(0, keyProp?.Severity ?? 0) * 4 + 4; _tickDown = MathF.Exp(Math.Max(-1f, keyProp?.Severity ?? -1f) + 1);
m_currentView.gameObject.SetActive(true); m_currentView.gameObject.SetActive(true);
Worker.Instance.SetCurrent(e); Worker.Instance.SetCurrent(e);
} }
public void SetCurrent(ReportViewModel viewModel) { public void OnItemClicked(ReportViewModel viewModel) {
int index = _displayingReports.IndexOf(viewModel); int index = _displayingReports.IndexOf(viewModel);
if (index == -1) return; if (index == -1) return;
SwitchTo(index); SwitchTo(index);
Worker.Instance.SetSelected(null);
} }
} }
} }

View File

@@ -1,10 +1,10 @@
using Cryville.Common.Unity;
using Cryville.Common.Unity.UI; using Cryville.Common.Unity.UI;
using Cryville.EEW.Report; using Cryville.EEW.Report;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using Utils;
namespace Cryville.EEW.Unity.UI { namespace Cryville.EEW.Unity.UI {
class EventOngoingView : MonoBehaviour { class EventOngoingView : MonoBehaviour {
@@ -27,7 +27,7 @@ namespace Cryville.EEW.Unity.UI {
} }
void SetView(float mainSeverity, string title, string location, CultureInfo culture) { void SetView(float mainSeverity, string title, string location, CultureInfo culture) {
SetSeverity(mainSeverity); SetSeverity(mainSeverity);
SetText(m_textView, string.Format("{0} {1}", title, location), culture); SetText(m_textView, string.Format(culture, "{0} {1}", title, location), culture);
} }
static void SetText(TMPLocalizedText view, string text, CultureInfo culture) { static void SetText(TMPLocalizedText view, string text, CultureInfo culture) {
if (string.IsNullOrWhiteSpace(text)) { if (string.IsNullOrWhiteSpace(text)) {
@@ -47,11 +47,14 @@ namespace Cryville.EEW.Unity.UI {
void Awake() { void Awake() {
_dockRatioTweener = new(() => m_dockLayoutGroup.DockOccupiedRatio, v => m_dockLayoutGroup.DockOccupiedRatio = v, Tweeners.Single); _dockRatioTweener = new(() => m_dockLayoutGroup.DockOccupiedRatio, v => m_dockLayoutGroup.DockOccupiedRatio = v, Tweeners.Single);
} }
void Start() { void OnEnable() {
m_button.onClick.AddListener(OnViewClicked); m_button.onClick.AddListener(OnViewClicked);
} }
void OnDisable() {
m_button.onClick.RemoveListener(OnViewClicked);
}
void OnViewClicked() { void OnViewClicked() {
EventOngoingListView.Instance.SetCurrent(_viewModel); EventOngoingListView.Instance.OnItemClicked(_viewModel);
} }
void Update() { void Update() {
_dockRatioTweener.Advance(Time.deltaTime); _dockRatioTweener.Advance(Time.deltaTime);

View File

@@ -14,9 +14,12 @@ namespace Cryville.EEW.Unity.UI {
[SerializeField] TMPLocalizedText m_revisionView; [SerializeField] TMPLocalizedText m_revisionView;
ReportViewModel _viewModel; ReportViewModel _viewModel;
protected virtual void Start() { protected virtual void OnEnable() {
if (m_reportViewButton != null) m_reportViewButton.onClick.AddListener(OnViewClicked); if (m_reportViewButton != null) m_reportViewButton.onClick.AddListener(OnViewClicked);
} }
protected virtual void OnDisable() {
if (m_reportViewButton != null) m_reportViewButton.onClick.RemoveListener(OnViewClicked);
}
void OnViewClicked() { void OnViewClicked() {
Worker.Instance.SetSelected(_viewModel); Worker.Instance.SetSelected(_viewModel);
} }

View File

@@ -8,7 +8,6 @@ namespace Cryville.EEW.Unity.UI {
public void Set(ReportGroup group) { public void Set(ReportGroup group) {
foreach (Transform child in transform) { foreach (Transform child in transform) {
child.SetParent(null, false);
Destroy(child.gameObject); Destroy(child.gameObject);
} }
foreach (var unit in group) { foreach (var unit in group) {

View File

@@ -8,10 +8,14 @@ namespace Cryville.EEW.Unity.UI {
[SerializeField] Button m_revisionViewContainerButton; [SerializeField] Button m_revisionViewContainerButton;
protected override void Start() { protected override void OnEnable() {
base.Start(); base.OnEnable();
m_revisionViewContainerButton.onClick.AddListener(OnRevisionViewClicked); m_revisionViewContainerButton.onClick.AddListener(OnRevisionViewClicked);
} }
protected override void OnDisable() {
base.OnDisable();
m_revisionViewContainerButton.onClick.RemoveListener(OnRevisionViewClicked);
}
void OnRevisionViewClicked() { void OnRevisionViewClicked() {
m_listView.gameObject.SetActive(!m_listView.gameObject.activeSelf); m_listView.gameObject.SetActive(!m_listView.gameObject.activeSelf);
} }

View File

@@ -0,0 +1,41 @@
using System.Globalization;
using System.Text;
using TMPro;
using UnityEngine;
namespace Cryville.EEW.Unity.UI {
[RequireComponent(typeof(TMP_Text))]
class StatusView : MonoBehaviour {
TMP_Text _textView;
void Awake() {
_textView = GetComponent<TMP_Text>();
}
StringBuilder _sb = new();
char[] _buffer = new char[256];
void Update() {
_sb.Clear();
_sb.AppendFormat(
CultureInfo.InvariantCulture,
"FPS: i{0:0} / s{1:0}\n",
1 / Time.deltaTime,
1 / Time.smoothDeltaTime
);
_sb.AppendFormat(
CultureInfo.InvariantCulture,
"SMem: {0:N0} / {1:N0}\n",
UnityEngine.Profiling.Profiler.GetMonoUsedSizeLong(),
UnityEngine.Profiling.Profiler.GetMonoHeapSizeLong()
);
_sb.AppendFormat(
CultureInfo.InvariantCulture,
"IMem: {0:N0} / {1:N0}",
UnityEngine.Profiling.Profiler.GetTotalAllocatedMemoryLong(),
UnityEngine.Profiling.Profiler.GetTotalReservedMemoryLong()
);
_sb.CopyTo(0, _buffer, _sb.Length);
_textView.SetText(_buffer, 0, _sb.Length);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4e142baf0f0bd70439133e17e7185611
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,4 @@
using System; using System;
using System.Globalization;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
@@ -13,7 +12,13 @@ namespace Cryville.EEW.Unity.UI {
} }
void Update() { void Update() {
_textView.text = string.Format(CultureInfo.CurrentCulture, "{0:G} ({1})", DateTime.Now, TimeZoneInfo.Local.ToTimeZoneString()); var time = DateTime.Now;
var timeZone = TimeZoneInfo.Local;
if (SharedSettings.Instance.OverrideTimeZone is TimeZoneInfo tTimeZone)
time = TimeZoneInfo.ConvertTime(time, timeZone, tTimeZone);
else
tTimeZone = timeZone;
_textView.text = SharedSettings.Instance.DoDisplayTimeZone ? string.Format(SharedCultures.CurrentCulture, "{0:G} ({1})", time, tTimeZone.ToTimeZoneString()) : time.ToString(SharedCultures.CurrentCulture);
} }
} }
} }

View File

@@ -1,20 +1,30 @@
using Cryville.EEW.BMKGOpenData;
using Cryville.EEW.BMKGOpenData.TTS;
using Cryville.EEW.Core; using Cryville.EEW.Core;
using Cryville.EEW.CWAOpenData; using Cryville.EEW.CWAOpenData;
using Cryville.EEW.CWAOpenData.Model; using Cryville.EEW.CWAOpenData.Model;
using Cryville.EEW.CWAOpenData.TTS; using Cryville.EEW.CWAOpenData.TTS;
using Cryville.EEW.EMSC;
using Cryville.EEW.GlobalQuake; using Cryville.EEW.GlobalQuake;
using Cryville.EEW.JMAAtom; using Cryville.EEW.JMAAtom;
using Cryville.EEW.JMAAtom.TTS; using Cryville.EEW.JMAAtom.TTS;
using Cryville.EEW.NOAA; using Cryville.EEW.NOAA;
using Cryville.EEW.NOAA.TTS; using Cryville.EEW.NOAA.TTS;
using Cryville.EEW.QuakeML;
using Cryville.EEW.Report; using Cryville.EEW.Report;
using Cryville.EEW.Unity.Map; using Cryville.EEW.Unity.Map;
using Cryville.EEW.Unity.UI; using Cryville.EEW.Unity.UI;
using Cryville.EEW.UpdateChecker; using Cryville.EEW.UpdateChecker;
using Cryville.EEW.USGS;
using Cryville.EEW.Wolfx; using Cryville.EEW.Wolfx;
using Cryville.EEW.Wolfx.Model;
using Cryville.EEW.Wolfx.TTS; using Cryville.EEW.Wolfx.TTS;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using UnityEngine; using UnityEngine;
@@ -27,8 +37,10 @@ namespace Cryville.EEW.Unity {
[SerializeField] MapElementManager m_mapElementManager; [SerializeField] MapElementManager m_mapElementManager;
[SerializeField] EventOngoingListView m_ongoingEventList; [SerializeField] EventOngoingListView m_ongoingEventList;
[SerializeField] EventGroupListView m_historyEventGroupList; [SerializeField] EventGroupListView m_historyEventGroupList;
[SerializeField] GameObject m_connectingHint;
GroupingCoreWorker _worker; CoreWorker _worker;
ReportGrouper _grouper;
CancellationTokenSource _cancellationTokenSource; CancellationTokenSource _cancellationTokenSource;
void Awake() { void Awake() {
@@ -41,6 +53,7 @@ namespace Cryville.EEW.Unity {
App.Init(); App.Init();
_worker = new(new TTSWorker()); _worker = new(new TTSWorker());
_grouper = new ReportGrouper();
_cancellationTokenSource = new(); _cancellationTokenSource = new();
} }
@@ -53,10 +66,19 @@ namespace Cryville.EEW.Unity {
_worker.TTSMessageGeneratorContext = SharedSettings.Instance; _worker.TTSMessageGeneratorContext = SharedSettings.Instance;
_ongoingReportManager.Changed += OnOngoingReported; _ongoingReportManager.Changed += OnOngoingReported;
_worker.Reported += OnReported; _worker.Reported += OnReported;
_worker.GroupUpdated += OnGroupUpdated; _grouper.GroupUpdated += OnGroupUpdated;
_worker.GroupRemoved += OnGroupRemoved; _grouper.GroupRemoved += OnGroupRemoved;
Task.Run(() => GatewayVerify(_cancellationTokenSource.Token)).ContinueWith(task => {
if (task.IsFaulted) {
OnReported(this, new() { Title = task.Exception.Message });
return;
}
_verified = true;
_uiActionQueue.Enqueue(() => m_connectingHint.SetActive(false));
Task.Run(() => ScheduledGatewayVerify(_cancellationTokenSource, _cancellationTokenSource.Token));
Task.Run(() => _worker.RunAsync(_cancellationTokenSource.Token)); Task.Run(() => _worker.RunAsync(_cancellationTokenSource.Token));
Task.Run(() => _ongoingReportManager.RunAsync(_cancellationTokenSource.Token)); Task.Run(() => _ongoingReportManager.RunAsync(_cancellationTokenSource.Token));
}, TaskScheduler.Current);
} }
void OnDestroy() { void OnDestroy() {
@@ -66,20 +88,24 @@ namespace Cryville.EEW.Unity {
} }
static void RegisterViewModelGenerators(CoreWorker worker) { static void RegisterViewModelGenerators(CoreWorker worker) {
worker.RegisterViewModelGenerator(new BMKGEarthquakeRVMGenerator());
worker.RegisterViewModelGenerator(new CENCEarthquakeRVMGenerator()); worker.RegisterViewModelGenerator(new CENCEarthquakeRVMGenerator());
worker.RegisterViewModelGenerator(new CENCEEWRVMGenerator()); worker.RegisterViewModelGenerator(new CENCEEWRVMGenerator());
worker.RegisterViewModelGenerator(new CWAEarthquakeRVMGenerator()); worker.RegisterViewModelGenerator(new CWAEarthquakeRVMGenerator());
worker.RegisterViewModelGenerator(new CWAEEWRVMGenerator()); worker.RegisterViewModelGenerator(new CWAEEWRVMGenerator());
worker.RegisterViewModelGenerator(new CWATsunamiRVMGenerator()); worker.RegisterViewModelGenerator(new CWATsunamiRVMGenerator());
worker.RegisterViewModelGenerator(new EMSCRealTimeEventRVMGenerator());
worker.RegisterViewModelGenerator(new FujianEEWRVMGenerator()); worker.RegisterViewModelGenerator(new FujianEEWRVMGenerator());
worker.RegisterViewModelGenerator(new GlobalQuakeRVMGenerator()); worker.RegisterViewModelGenerator(new GlobalQuakeRVMGenerator());
worker.RegisterViewModelGenerator(new JMAAtomRVMGenerator()); worker.RegisterViewModelGenerator(new JMAAtomRVMGenerator());
worker.RegisterViewModelGenerator(new JMAEEWRVMGenerator()); worker.RegisterViewModelGenerator(new JMAEEWRVMGenerator());
worker.RegisterViewModelGenerator(new NOAAAtomRVMGenerator()); worker.RegisterViewModelGenerator(new NOAAAtomRVMGenerator());
worker.RegisterViewModelGenerator(new QuakeMLEventRVMGenerator());
worker.RegisterViewModelGenerator(new SichuanEEWRVMGenerator()); worker.RegisterViewModelGenerator(new SichuanEEWRVMGenerator());
worker.RegisterViewModelGenerator(new VersionRVMGenerator()); worker.RegisterViewModelGenerator(new VersionRVMGenerator());
} }
static void RegisterTTSMessageGenerators(CoreWorker worker) { static void RegisterTTSMessageGenerators(CoreWorker worker) {
worker.RegisterTTSMessageGenerator(new BMKGEarthquakeTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new CENCEarthquakeTTSMessageGenerator()); worker.RegisterTTSMessageGenerator(new CENCEarthquakeTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new CENCEEWTTSMessageGenerator()); worker.RegisterTTSMessageGenerator(new CENCEEWTTSMessageGenerator());
worker.RegisterTTSMessageGenerator(new CWAEarthquakeTTSMessageGenerator()); worker.RegisterTTSMessageGenerator(new CWAEarthquakeTTSMessageGenerator());
@@ -92,47 +118,106 @@ namespace Cryville.EEW.Unity {
worker.RegisterTTSMessageGenerator(new SichuanEEWTTSMessageGenerator()); worker.RegisterTTSMessageGenerator(new SichuanEEWTTSMessageGenerator());
} }
WolfxWorker _wolfxWorker; bool _verified;
JMAAtomWorker _jmaWorker;
CWAReportWorker<Tsunami> _cwa14Worker;
CWAReportWorker<Earthquake> _cwa15Worker;
CWAReportWorker<Earthquake> _cwa16Worker;
GlobalQuakeWorker _gqWorker;
NOAAAtomWorker _ntwcWorker;
NOAAAtomWorker _ptwcWorker;
UpdateCheckerWorker _updateChecker;
void BuildWorkers() { void BuildWorkers() {
#if UNITY_EDITOR #if UNITY_EDITOR
_worker.AddWorker(_wolfxWorker = new WolfxWorker(new Uri("ws://localhost:9995/wolfx"))); _worker.AddWorker(new WolfxWorker(new Uri("ws://localhost:9995/wolfx")));
_worker.AddWorker(_jmaWorker = new JMAAtomWorker(new Uri("http://localhost:9095/eqvol.xml"))); _worker.AddWorker(new JMAAtomWorker(new Uri("http://localhost:9095/eqvol.xml")));
_worker.AddWorker(_cwa14Worker = new CWAReportWorker<Tsunami>(new Uri("http://localhost:9095/E-A0014-001.json"), "1")); _worker.AddWorker(new CWAReportWorker<Tsunami>(new Uri("http://localhost:9095/E-A0014-001.json"), "1"));
_worker.AddWorker(_cwa15Worker = new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0015-001.json"), "1")); _worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0015-001.json"), "1"));
_worker.AddWorker(_cwa16Worker = new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0016-001.json"), "1")); _worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0016-001.json"), "1"));
_worker.AddWorker(_ntwcWorker = new NOAAAtomWorker(new("http://localhost:9095/PAAQAtom.xml"))); BMKGOpenDataWorker bmkgWorker = new(new Uri("http://localhost:9095/autogempa.json"));
// _worker.AddWorker(_gqWorker = new GlobalQuakeWorker("localhost", 38000)); bmkgWorker.SetDataUris(new Uri[] { new("http://localhost:9095/gempadirasakan.json") });
_worker.AddWorker(bmkgWorker);
_worker.AddWorker(new NOAAAtomWorker(new("http://localhost:9095/PAAQAtom.xml")));
_worker.AddWorker(new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"));
#else #else
// TODO foreach (var source in SharedSettings.Instance.EventSources) {
_worker.AddWorker(source switch {
BMKGOpenDataEventSourceConfig bmkgOpenData => BuildBMKGOpenDataWorkerUris(new BMKGOpenDataWorker(new("https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json")), bmkgOpenData),
CWAOpenDataEventSourceConfig cwaOpenData => cwaOpenData.Subtype switch {
"E-A0014-001" => new CWAReportWorker<Tsunami>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0014-001"), cwaOpenData.Token, 1440, 17280),
"E-A0015-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001"), cwaOpenData.Token),
"E-A0016-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0016-001"), cwaOpenData.Token),
_ => throw new InvalidOperationException("Unknown CWA open data sub-type."),
},
EMSCRealTimeEventSourceConfig => new EMSCRealTimeWorker(new("wss://www.seismicportal.eu/standing_order/websocket")),
GlobalQuakeServer15EventSourceConfig gq => new GlobalQuakeWorker15(gq.Host, gq.Port),
GlobalQuakeServerEventSourceConfig gq => new GlobalQuakeWorker(gq.Host, gq.Port),
JMAAtomEventSourceConfig jmaAtom => BuildJMAAtomWorkerFilter(new JMAAtomWorker(new("https://www.data.jma.go.jp/developer/xml/feed/eqvol.xml")), jmaAtom),
NOAAEventSourceConfig noaaAtom => noaaAtom.Subtype switch {
"PAAQ" => new NOAAAtomWorker(new("https://www.tsunami.gov/events/xml/PAAQAtom.xml"), new("https://www.tsunami.gov/"), new("/php/esri.php?e=t", UriKind.Relative), "PAAQ"),
"PHEB" => new NOAAAtomWorker(new("https://www.tsunami.gov/events/xml/PHEBAtom.xml"), new("https://www.tsunami.gov/"), new("/php/esri.php?e=t", UriKind.Relative), "PHEB"),
_ => throw new InvalidOperationException("Unknown NOAA sub-type."),
},
UpdateCheckerEventSourceConfig => new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"),
USGSQuakeMLEventSourceConfig usgsQuakeML => BuildUSGSQuakeMLWorkerUri(new USGSQuakeMLWorker(new Uri("https://earthquake.usgs.gov/earthquakes/feed/v1.0/quakeml.php")), usgsQuakeML),
WolfxEventSourceConfig wolfx => BuildWolfxWorkerFilter(new WolfxWorker(new Uri("wss://ws-api.wolfx.jp/all_eew")), wolfx),
_ => throw new InvalidOperationException("Unknown event source type."),
});
}
#endif #endif
if (_updateChecker == null) _worker.AddWorker(_updateChecker = new(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity")); }
static JMAAtomWorker BuildJMAAtomWorkerFilter(JMAAtomWorker worker, JMAAtomEventSourceConfig config) {
if (config.Filter != null) worker.SetFilter(config.Filter);
worker.IsFilterWhitelist = config.IsFilterWhitelist;
return worker;
}
static WolfxWorker BuildWolfxWorkerFilter(WolfxWorker worker, WolfxEventSourceConfig config) {
if (config.Filter != null) worker.SetFilter(config.Filter.Select(i => i switch {
"cenc_eew" => typeof(CENCEEW),
"cenc_eqlist" => typeof(WolfxEarthquakeList<CENCEarthquake>),
"cwa_eew" => typeof(CWAEEW),
"fj_eew" => typeof(FujianEEW),
"jma_eew" => typeof(JMAEEW),
"sc_eew" => typeof(SichuanEEW),
_ => throw new InvalidOperationException("Unknown Wolfx event type."),
}));
worker.IsFilterWhitelist = config.IsFilterWhitelist;
return worker;
}
static BMKGOpenDataWorker BuildBMKGOpenDataWorkerUris(BMKGOpenDataWorker worker, BMKGOpenDataEventSourceConfig config) {
worker.SetDataUris(config.Subtypes.Select(i => new Uri(string.Format(CultureInfo.InvariantCulture, "https://data.bmkg.go.id/DataMKG/TEWS/{0}.json", i))));
return worker;
}
static USGSQuakeMLWorker BuildUSGSQuakeMLWorkerUri(USGSQuakeMLWorker worker, USGSQuakeMLEventSourceConfig config) {
worker.SetFeedRelativeUri(new(string.Format(CultureInfo.InvariantCulture, "/earthquakes/feed/v1.0/summary/{0}.quakeml", config.Subtype), UriKind.Relative));
return worker;
} }
readonly OngoingReportManager _ongoingReportManager = new(); readonly OngoingReportManager _ongoingReportManager = new();
readonly ConcurrentQueue<Action> _uiActionQueue = new(); readonly ConcurrentQueue<Action> _uiActionQueue = new();
ReportViewModel _latestHistoryReport;
void OnReported(object sender, ReportViewModel e) { void OnReported(object sender, ReportViewModel e) {
Debug.Log(e); if (e.Model is Exception && e.Model is not SourceWorkerNetworkException)
Debug.LogError(e);
_grouper.Report(e);
_ongoingReportManager.Report(e); _ongoingReportManager.Report(e);
_uiActionQueue.Enqueue(() => m_mapElementManager.SetSelected(e)); _uiActionQueue.Enqueue(() => {
if (m_mapElementManager.OngoingCount == 0) {
m_mapElementManager.SetSelected(e);
m_cameraController.OnMapElementUpdated();
}
if (e.InvalidatedTime == null && (!(e.RevisionKey?.IsCancellation ?? false))) {
_latestHistoryReport = e;
}
});
} }
void OnOngoingReported(ReportViewModel item, CollectionChangeAction action) { void OnOngoingReported(ReportViewModel item, CollectionChangeAction action) {
if (action == CollectionChangeAction.Add) { if (action == CollectionChangeAction.Add) {
_uiActionQueue.Enqueue(() => { _uiActionQueue.Enqueue(() => {
m_mapElementManager.AddOngoing(item); if (m_mapElementManager.Add(item)) {
m_mapElementManager.SetSelected(null);
}
m_ongoingEventList.Add(item); m_ongoingEventList.Add(item);
}); });
} }
else if (action == CollectionChangeAction.Remove) { else if (action == CollectionChangeAction.Remove) {
_uiActionQueue.Enqueue(() => { _uiActionQueue.Enqueue(() => {
m_mapElementManager.RemoveOngoing(item); m_mapElementManager.Remove(item);
if (m_mapElementManager.Count == 0 && SharedSettings.Instance.DoSwitchBackToHistory && _latestHistoryReport is not null) {
m_mapElementManager.SetSelected(_latestHistoryReport, true);
}
m_ongoingEventList.Remove(item); m_ongoingEventList.Remove(item);
}); });
} }
@@ -148,15 +233,58 @@ namespace Cryville.EEW.Unity {
m_cameraController.OnMapElementUpdated(); m_cameraController.OnMapElementUpdated();
} }
public void SetCurrent(ReportViewModel e) { public void SetCurrent(ReportViewModel e) {
m_mapElementManager.SetCurrent(e); if (m_mapElementManager.SetCurrent(e)) {
m_cameraController.OnMapElementUpdated(); m_cameraController.OnMapElementUpdated();
} }
}
void Update() { void Update() {
while (_uiActionQueue.TryDequeue(out var action)) { while (_uiActionQueue.TryDequeue(out var action)) {
action(); action();
m_cameraController.OnMapElementUpdated();
} }
} }
async Task ScheduledGatewayVerify(CancellationTokenSource source, CancellationToken cancellationToken) {
Exception lastEx = null;
for (int i = 0; i < 8; i++) {
await Task.Delay(TimeSpan.FromHours(3), cancellationToken).ConfigureAwait(true);
try {
await GatewayVerify(cancellationToken).ConfigureAwait(true);
i = -1;
}
catch (HttpRequestException ex) {
lastEx = ex;
}
catch (WebException ex) {
lastEx = ex;
}
catch (InvalidOperationException ex) {
lastEx = ex;
break;
}
}
if (lastEx != null) {
OnReported(this, new() { Title = lastEx.Message });
_verified = false;
}
source.Cancel();
}
#if UNITY_EDITOR
#pragma warning disable CS1998
#endif
static async Task GatewayVerify(CancellationToken cancellationToken) {
#if !UNITY_EDITOR
using var client = new HttpClient();
client.DefaultRequestHeaders.UserAgent.ParseAdd(SharedSettings.Instance.UnityUserAgent);
using var response = await client.GetAsync(new Uri("https://gateway.cryville.world/?rin=" + SharedSettings.Instance.Id), cancellationToken).ConfigureAwait(true);
if (response.StatusCode is >= ((HttpStatusCode)400) and < ((HttpStatusCode)500)) {
throw new InvalidOperationException(response.ReasonPhrase);
}
response.EnsureSuccessStatusCode();
#endif
}
#if UNITY_EDITOR
#pragma warning restore CS1998
#endif
} }
} }

View File

@@ -149,16 +149,16 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123805240} m_GameObject: {fileID: 123805240}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1431650511} m_Father: {fileID: 408286581}
m_RootOrder: 2 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.75, y: 0} m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@@ -468,9 +468,8 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 249202787} - component: {fileID: 249202787}
- component: {fileID: 249202790} - component: {fileID: 249202789}
- component: {fileID: 249202791} - component: {fileID: 249202788}
- component: {fileID: 249202792}
m_Layer: 5 m_Layer: 5
m_Name: _content m_Name: _content
m_TagString: Untagged m_TagString: Untagged
@@ -493,52 +492,12 @@ RectTransform:
m_Father: {fileID: 800505390} m_Father: {fileID: 800505390}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &249202790 --- !u!114 &249202788
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 249202786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 6
m_Right: 6
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 0
m_Spacing: 8
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 1
m_ReverseArrangement: 0
--- !u!114 &249202791
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 249202786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!114 &249202792
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@@ -550,7 +509,27 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2426bd244f51fed429d955beee52e91d, type: 3} m_Script: {fileID: 11500000, guid: 2426bd244f51fed429d955beee52e91d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_prefabEventGroupView: {fileID: 1040273476696300640, guid: 5d21267de716a844c92260bad4d20b0a, type: 3} --- !u!114 &249202789
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 249202786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1257c1f4490f1d64bb8fc52a9abed1ae, type: 3}
m_Name:
m_EditorClassIdentifier:
m_itemTemplate: {fileID: 5834406092508179350, guid: 5d21267de716a844c92260bad4d20b0a, type: 3}
m_direction: 1
m_padding:
m_Left: 6
m_Right: 6
m_Top: 6
m_Bottom: 6
m_spacing: 6
m_itemCount: 0
--- !u!1 &303098820 --- !u!1 &303098820
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -634,7 +613,7 @@ Camera:
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_ClearFlags: 2 m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} m_BackGroundColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_projectionMatrixMode: 1 m_projectionMatrixMode: 1
m_GateFitMode: 2 m_GateFitMode: 2
m_FOVAxisMode: 0 m_FOVAxisMode: 0
@@ -698,6 +677,46 @@ MonoBehaviour:
m_layerElement: {fileID: 1602500234} m_layerElement: {fileID: 1602500234}
m_layerElementSub: {fileID: 303098821} m_layerElementSub: {fileID: 303098821}
m_prefabTile: {fileID: 7683017549812261837, guid: e090edd328c6750478f5849a43a9d278, type: 3} m_prefabTile: {fileID: 7683017549812261837, guid: e090edd328c6750478f5849a43a9d278, type: 3}
m_prefabBitmapHolder: {fileID: 1455558857588368834, guid: 1a5cf693e0cf6b94390f72f521c151ba, type: 3}
--- !u!1 &408286580
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 408286581}
m_Layer: 5
m_Name: Overlay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &408286581
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 408286580}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 123805241}
- {fileID: 2039723256}
- {fileID: 1925427751}
m_Father: {fileID: 1431650511}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.75, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &719162186 --- !u!1 &719162186
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -947,7 +966,8 @@ MonoBehaviour:
m_cameraController: {fileID: 376792590} m_cameraController: {fileID: 376792590}
m_mapElementManager: {fileID: 1602500234} m_mapElementManager: {fileID: 1602500234}
m_ongoingEventList: {fileID: 719162189} m_ongoingEventList: {fileID: 719162189}
m_historyEventGroupList: {fileID: 249202792} m_historyEventGroupList: {fileID: 249202788}
m_connectingHint: {fileID: 1925427750}
--- !u!1 &1349222218 --- !u!1 &1349222218
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -959,7 +979,7 @@ GameObject:
- component: {fileID: 1349222219} - component: {fileID: 1349222219}
- component: {fileID: 1349222222} - component: {fileID: 1349222222}
- component: {fileID: 1349222221} - component: {fileID: 1349222221}
- component: {fileID: 1349222220} - component: {fileID: 1349222223}
m_Layer: 5 m_Layer: 5
m_Name: History Panel m_Name: History Panel
m_TagString: Untagged m_TagString: Untagged
@@ -988,36 +1008,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1349222220
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1349222218}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 249202787}
m_Horizontal: 0
m_Vertical: 1
m_MovementType: 1
m_Elasticity: 0.1
m_Inertia: 1
m_DecelerationRate: 0.135
m_ScrollSensitivity: 32
m_Viewport: {fileID: 800505390}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 0
m_VerticalScrollbarVisibility: 0
m_HorizontalScrollbarSpacing: 0
m_VerticalScrollbarSpacing: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1349222221 --- !u!114 &1349222221
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1056,6 +1046,36 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1349222218} m_GameObject: {fileID: 1349222218}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!114 &1349222223
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1349222218}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 249202787}
m_Horizontal: 0
m_Vertical: 1
m_MovementType: 1
m_Elasticity: 0.1
m_Inertia: 1
m_DecelerationRate: 0.135
m_ScrollSensitivity: 32
m_Viewport: {fileID: 800505390}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 0
m_VerticalScrollbarVisibility: 0
m_HorizontalScrollbarSpacing: 0
m_VerticalScrollbarSpacing: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1412061071 --- !u!1 &1412061071
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1181,7 +1201,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 719162187} - {fileID: 719162187}
- {fileID: 1349222219} - {fileID: 1349222219}
- {fileID: 123805241} - {fileID: 408286581}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 5 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1313,6 +1333,293 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1925427750
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1925427751}
- component: {fileID: 1925427754}
- component: {fileID: 1925427753}
m_Layer: 5
m_Name: Connecting
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1925427751
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1925427750}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 408286581}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1925427753
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1925427750}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83e7715acbfae1d4b84414c13d03ed3f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Connecting...
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2b12354fb2d86744887c3e4bfee63986, type: 2}
m_sharedMaterial: {fileID: -3021868053195457599, guid: 2b12354fb2d86744887c3e4bfee63986, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4279769379
m_fontColor: {r: 0.13725491, g: 0.09803922, b: 0.09411765, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0
m_fontSizeMax: 0
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 0
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 8, y: 4, z: 8, w: 4}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1925427754
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1925427750}
m_CullTransparentMesh: 1
--- !u!1 &2039723255
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2039723256}
- component: {fileID: 2039723259}
- component: {fileID: 2039723258}
- component: {fileID: 2039723257}
m_Layer: 5
m_Name: Status
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2039723256
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2039723255}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 408286581}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2039723257
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2039723255}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e142baf0f0bd70439133e17e7185611, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2039723258
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2039723255}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83e7715acbfae1d4b84414c13d03ed3f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'FPS: i60 / s60
SMem: 0 / 0
IMem: 0 / 0'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2b12354fb2d86744887c3e4bfee63986, type: 2}
m_sharedMaterial: {fileID: -3021868053195457599, guid: 2b12354fb2d86744887c3e4bfee63986, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4279769379
m_fontColor: {r: 0.13725491, g: 0.09803922, b: 0.09411765, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 12
m_fontSizeBase: 12
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0
m_fontSizeMax: 0
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 1024
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 0
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 8, y: 4, z: 8, w: 4}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &2039723259
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2039723255}
m_CullTransparentMesh: 1
--- !u!114 &79416137231161493 --- !u!114 &79416137231161493
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6430b56ba6977f04291fbf3b0a464655
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,78 @@
fileFormatVersion: 2
guid: 88e8ae9c8ce06934ab7681fb678d7b00
labels:
- RoslynAnalyzer
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,78 @@
fileFormatVersion: 2
guid: 15569127b9ff7604198a55092602f59a
labels:
- RoslynAnalyzer
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 9c2c20067e0adc54c813350fd61f9a3a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: e9164d2df3d1c03499419935666416ae
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 152cea136489ac044b7c12c66ba72b53
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: e1ef9470a2a1d7b4da9ddd106620b665
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 48f0c884a8a1e4043948f765ed18e4bc
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 4d3d5b78e07866347b2ba028b4bd3ef8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: ec4fba30706c64142a5504e3f0e64620
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: b3347ce24f73cab44a4191aa8976d88a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -519,7 +519,7 @@
<param name="Properties">The properties of the feature.</param> <param name="Properties">The properties of the feature.</param>
<param name="BoundingBox">The bounding box.</param> <param name="BoundingBox">The bounding box.</param>
</member> </member>
<member name="M:Cryville.EEW.Models.GeoJSON.Feature.#ctor(System.Object,Cryville.EEW.Models.GeoJSON.Geometry,System.Collections.Generic.IDictionary{System.String,System.Object},System.Double[])"> <member name="M:Cryville.EEW.Models.GeoJSON.Feature.#ctor(System.Text.Json.JsonElement,Cryville.EEW.Models.GeoJSON.Geometry,System.Collections.Generic.IDictionary{System.String,System.Text.Json.JsonElement},System.Double[])">
<summary> <summary>
Represents a spatially bounded thing. Represents a spatially bounded thing.
</summary> </summary>
@@ -741,143 +741,143 @@
<member name="M:Cryville.EEW.Models.GeoJSON.PositionConverter.Write(System.Text.Json.Utf8JsonWriter,Cryville.EEW.Models.GeoJSON.Position,System.Text.Json.JsonSerializerOptions)"> <member name="M:Cryville.EEW.Models.GeoJSON.PositionConverter.Write(System.Text.Json.Utf8JsonWriter,Cryville.EEW.Models.GeoJSON.Position,System.Text.Json.JsonSerializerOptions)">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="T:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext"> <member name="T:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext">
<summary> <summary>
<see cref="T:System.Text.Json.Serialization.JsonSerializerContext" /> for GeoJSON objects. <see cref="T:System.Text.Json.Serialization.JsonSerializerContext" /> for GeoJSON objects.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Double"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Double">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.NullableDouble"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.NullableDouble">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.DoubleArray"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.DoubleArray">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Feature"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Feature">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.FeatureArray"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.FeatureArray">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.FeatureCollection"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.FeatureCollection">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeoJSONObject"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeoJSONObject">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Geometry"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Geometry">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeometryArray"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeometryArray">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeometryCollection"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeometryCollection">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.LineString"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.LineString">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.MultiLineString"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.MultiLineString">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.MultiPoint"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.MultiPoint">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.MultiPolygon"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.MultiPolygon">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Point"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Point">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Polygon"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Polygon">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Position"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Position">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.PositionArray"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.PositionArray">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.PositionArrayArray"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.PositionArrayArray">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.PositionArrayArrayArray"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.PositionArrayArrayArray">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.IDictionaryStringObject"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.IDictionaryStringJsonElement">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Object"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.JsonElement">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.String"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.String">
<summary> <summary>
Defines the source generated JSON serialization contract metadata for a given type. Defines the source generated JSON serialization contract metadata for a given type.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Default"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Default">
<summary> <summary>
The default <see cref="T:System.Text.Json.Serialization.JsonSerializerContext"/> associated with a default <see cref="T:System.Text.Json.JsonSerializerOptions"/> instance. The default <see cref="T:System.Text.Json.Serialization.JsonSerializerContext"/> associated with a default <see cref="T:System.Text.Json.JsonSerializerOptions"/> instance.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeneratedSerializerOptions"> <member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeneratedSerializerOptions">
<summary> <summary>
The source-generated options associated with this context. The source-generated options associated with this context.
</summary> </summary>
</member> </member>
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.#ctor"> <member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.#ctor">
<inheritdoc/> <inheritdoc/>
</member> </member>
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.#ctor(System.Text.Json.JsonSerializerOptions)"> <member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.#ctor(System.Text.Json.JsonSerializerOptions)">
<inheritdoc/> <inheritdoc/>
</member> </member>
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GetTypeInfo(System.Type)"> <member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GetTypeInfo(System.Type)">
<inheritdoc/> <inheritdoc/>
</member> </member>
<member name="T:Cryville.EEW.Models.XmlSerializedDateTimeOffset"> <member name="T:Cryville.EEW.Models.XmlSerializedDateTimeOffset">
@@ -1039,6 +1039,9 @@
<member name="P:Cryville.EEW.Report.EmptyRVMGeneratorContext.SeverityScheme"> <member name="P:Cryville.EEW.Report.EmptyRVMGeneratorContext.SeverityScheme">
<inheritdoc /> <inheritdoc />
</member> </member>
<member name="P:Cryville.EEW.Report.EmptyRVMGeneratorContext.LocationConverter">
<inheritdoc />
</member>
<member name="T:Cryville.EEW.Report.EmptySeverityScheme"> <member name="T:Cryville.EEW.Report.EmptySeverityScheme">
<summary> <summary>
An empty <see cref="T:Cryville.EEW.Report.ISeverityScheme" /> that always returns <c>-1</c>. An empty <see cref="T:Cryville.EEW.Report.ISeverityScheme" /> that always returns <c>-1</c>.
@@ -1189,6 +1192,11 @@
The severity scheme. The severity scheme.
</summary> </summary>
</member> </member>
<member name="P:Cryville.EEW.Report.IRVMGeneratorContext.LocationConverter">
<summary>
The location converter.
</summary>
</member>
<member name="T:Cryville.EEW.Report.ISeverityScheme"> <member name="T:Cryville.EEW.Report.ISeverityScheme">
<summary> <summary>
Represents a severity scheme, extracting severity values from different properties. Represents a severity scheme, extracting severity values from different properties.
@@ -1497,6 +1505,11 @@
The culture <c>en-US</c>. The culture <c>en-US</c>.
</summary> </summary>
</member> </member>
<member name="F:Cryville.EEW.SharedCultures.IdIdCulture">
<summary>
The culture <c>id-ID</c>.
</summary>
</member>
<member name="F:Cryville.EEW.SharedCultures.JaJpCulture"> <member name="F:Cryville.EEW.SharedCultures.JaJpCulture">
<summary> <summary>
The culture <c>ja-JP</c>. The culture <c>ja-JP</c>.
@@ -1512,6 +1525,16 @@
The culture <c>zh-TW</c>. The culture <c>zh-TW</c>.
</summary> </summary>
</member> </member>
<member name="F:Cryville.EEW.SharedCultures.CurrentCulture">
<summary>
The current culture.
</summary>
</member>
<member name="F:Cryville.EEW.SharedCultures.CurrentUICulture">
<summary>
The current UI culture.
</summary>
</member>
<member name="M:Cryville.EEW.SharedCultures.Get(System.String)"> <member name="M:Cryville.EEW.SharedCultures.Get(System.String)">
<summary> <summary>
Gets a culture of the specified name. Gets a culture of the specified name.
@@ -1549,6 +1572,11 @@
China Standard Time. China Standard Time.
</summary> </summary>
</member> </member>
<member name="F:Cryville.EEW.SharedTimeZones.SEAsia">
<summary>
SE Asia Standard Time.
</summary>
</member>
<member name="F:Cryville.EEW.SharedTimeZones.Taipei"> <member name="F:Cryville.EEW.SharedTimeZones.Taipei">
<summary> <summary>
Taipei Standard Time. Taipei Standard Time.

BIN
Assets/Plugins/QuakeML.dll Normal file

Binary file not shown.

View File

@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: a5809b30a2765e54aa6f2b5d15c00a76
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,46 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1455558857588368834
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8746876075196617235}
- component: {fileID: 122704584488816298}
m_Layer: 0
m_Name: Bitmap Holder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8746876075196617235
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1455558857588368834}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &122704584488816298
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1455558857588368834}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c17f6b26e9a6bd74e8b2d071c6951c41, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1a5cf693e0cf6b94390f72f521c151ba
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1271,6 +1271,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 5834406092508179349} - component: {fileID: 5834406092508179349}
- component: {fileID: 5834406092508179348} - component: {fileID: 5834406092508179348}
- component: {fileID: 3674434324840772959}
- component: {fileID: 1040273476696300640} - component: {fileID: 1040273476696300640}
m_Layer: 5 m_Layer: 5
m_Name: Event Group m_Name: Event Group
@@ -1300,7 +1301,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 320, y: 160} m_SizeDelta: {x: 320, y: 0}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &5834406092508179348 --- !u!114 &5834406092508179348
MonoBehaviour: MonoBehaviour:
@@ -1328,6 +1329,20 @@ MonoBehaviour:
m_ChildScaleWidth: 0 m_ChildScaleWidth: 0
m_ChildScaleHeight: 0 m_ChildScaleHeight: 0
m_ReverseArrangement: 0 m_ReverseArrangement: 0
--- !u!114 &3674434324840772959
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5834406092508179350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!114 &1040273476696300640 --- !u!114 &1040273476696300640
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

File diff suppressed because one or more lines are too long

BIN
Assets/Sprites/appicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 419b00c31d31d234d93476f8b2e04653
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 75452b90c729a7248958090ab7acd6fd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
{
"Culture": "en-US",
"Strings": {
"Headline": "An earthquake{1} occurred at {0:HH:mm:ss 'on' MMM dd yyyy} Western Indonesia Time.{2}",
"HeadlineDepth": " Hypocenter depth {0}km.",
"HeadlineMagnitude": " of magnitude {0:F1}",
"MaxIntensity": "The maximum intensity observed is {0}.",
"Region": "The epicenter is in {0}.",
"Title": "Earthquake Data.",
"TitleStandAlone": "Earthquake Data"
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e4420490220c6df4fb07cd0c63dec184
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
{
"Culture": "id-ID",
"Strings": {
"Headline": "Telah terjadi gempa pada {0:dd MMMM yyyy 'pukul' H 'lewat' m 'menit' s 'detik'} Waktu Indonesia Barat{1}{2}.",
"HeadlineDepth": ", pada kedalaman {0} km",
"HeadlineMagnitude": ", dengan magnitudo {0:F1}",
"MaxIntensity": "Intensitas gempa maksimum yang dirasakan adalah {0}.",
"Region": "Pusat gempa berada di {0}.",
"Title": "Data Gempabumi.",
"TitleStandAlone": "Data Gempabumi"
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 76aa8016add210b489ed175d006ef35d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More