ulong and grid list wrapper test

- wrapped lists in serialized dicts do work, maybe wrap anything.
- note: maybe convert long fields to string fields to support ulong?
This commit is contained in:
max
2023-07-03 23:35:29 +02:00
parent 6f600c38ab
commit 80c90d884a
7 changed files with 79 additions and 52 deletions

View File

@ -24,9 +24,9 @@ namespace VertexColor.ScenePartition
[System.Serializable]
public class ScenePartition
{
public long id = 0;
//public long classId = 0;
public string filePath = null;
public ulong id = 0;
//public ulong classId = 0;
public string filePath = null; // TODO: Only store relative path.
//public string[] data = null;
public LongSortedSet references = new LongSortedSet();
@ -45,7 +45,7 @@ namespace VertexColor.ScenePartition
Match match = Regex.Match(data[0], pattern);
if (!match.Success) return;
if (!long.TryParse(match.Groups[1].Value, out id)) return;
if (!ulong.TryParse(match.Groups[1].Value, out id)) return;
}
//{ // Get class id.
@ -68,7 +68,7 @@ namespace VertexColor.ScenePartition
if (!match.Success) continue;
if (long.TryParse(match.Groups[1].Value, out long fileNumber))
if (ulong.TryParse(match.Groups[1].Value, out ulong fileNumber))
{
if (fileNumber == 0) continue; // 0 == nothing.