generated from max/template-unity-project
long ids but not long enough!
- Object and prefab file id loading - Generate grid update - Switched uint to long but should probably be ulong!
This commit is contained in:
@ -24,10 +24,11 @@ namespace VertexColor.ScenePartition
|
||||
[System.Serializable]
|
||||
public class ScenePartition
|
||||
{
|
||||
public uint id = 0;
|
||||
public long id = 0;
|
||||
//public long classId = 0;
|
||||
public string filePath = null;
|
||||
//public string[] data = null;
|
||||
public UintSortedSet references = new UintSortedSet();
|
||||
public LongSortedSet references = new LongSortedSet();
|
||||
|
||||
public ScenePartition(string filePath)
|
||||
{
|
||||
@ -44,9 +45,19 @@ namespace VertexColor.ScenePartition
|
||||
Match match = Regex.Match(data[0], pattern);
|
||||
|
||||
if (!match.Success) return;
|
||||
if (!uint.TryParse(match.Groups[1].Value, out id)) return;
|
||||
if (!long.TryParse(match.Groups[1].Value, out id)) return;
|
||||
}
|
||||
|
||||
//{ // Get class id.
|
||||
// string pattern = @"!u!(\d+)";
|
||||
|
||||
// // Find all matches using regex
|
||||
// Match match = Regex.Match(data[0], pattern);
|
||||
|
||||
// if (!match.Success) return;
|
||||
// if (!long.TryParse(match.Groups[1].Value, out classId)) return;
|
||||
//}
|
||||
|
||||
{ // Get references.
|
||||
string pattern = @"fileID:\s(\d+)";
|
||||
|
||||
@ -57,7 +68,7 @@ namespace VertexColor.ScenePartition
|
||||
|
||||
if (!match.Success) continue;
|
||||
|
||||
if (uint.TryParse(match.Groups[1].Value, out uint fileNumber))
|
||||
if (long.TryParse(match.Groups[1].Value, out long fileNumber))
|
||||
{
|
||||
if (fileNumber == 0) continue; // 0 == nothing.
|
||||
|
||||
|
Reference in New Issue
Block a user