From fcab4dd4341b8bbf7308dcd3df78a5bb9c932b59 Mon Sep 17 00:00:00 2001 From: hadashiA Date: Thu, 30 Jul 2026 10:16:38 +0900 Subject: [PATCH] Fix compilation errors --- .../UniGLTF/Runtime/UniGLTF/IO/GltfData.cs | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/Packages/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs b/Packages/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs index c998e7687..3caaf83dd 100644 --- a/Packages/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs +++ b/Packages/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs @@ -1,12 +1,7 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; -<<<<<<< HEAD:Packages/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs using UniJSON; -======= -using System.Text; ->>>>>>> bce3a9b5c (stringを返さず直接byte配列を渡すように変更):Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs using Unity.Collections; namespace UniGLTF @@ -37,11 +32,7 @@ namespace UniGLTF /// JSON chunk ToString /// > This chunk MUST be the very first chunk of Binary glTF asset /// -<<<<<<< HEAD:Packages/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs public string Json => _jsonString ??= _utf8JsonString.ToString(); -======= - public string Json => _json ?? Encoding.UTF8.GetString(_jsonBytes.Span); ->>>>>>> bce3a9b5c (stringを返さず直接byte配列を渡すように変更):Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs /// /// GLTF parsed from JSON chunk @@ -81,7 +72,6 @@ namespace UniGLTF /// Dictionary> _UriCache = new Dictionary>(); -<<<<<<< HEAD:Packages/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs /// /// json string in utf8 /// @@ -110,20 +100,11 @@ namespace UniGLTF } } } - - internal GltfData(string targetPath, Utf8String jsonString, glTF gltf, IReadOnlyList chunks, IStorage storage, MigrationFlags migrationFlags) - { - TargetPath = targetPath; - _utf8JsonString = jsonString; -======= - private string _json; - readonly ReadOnlyMemory _jsonBytes; public GltfData(string targetPath, ReadOnlyMemory jsonBytes, glTF gltf, IReadOnlyList chunks, IStorage storage, MigrationFlags migrationFlags) { TargetPath = targetPath; - _jsonBytes = jsonBytes; ->>>>>>> bce3a9b5c (stringを返さず直接byte配列を渡すように変更):Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs + _utf8JsonString = new Utf8String(jsonBytes); GLTF = gltf; Chunks = chunks; _storage = storage; @@ -139,6 +120,12 @@ namespace UniGLTF } } + internal GltfData(string targetPath, Utf8String jsonString, glTF gltf, IReadOnlyList chunks, IStorage storage, MigrationFlags migrationFlags) + { + TargetPath = targetPath; + _utf8JsonString = jsonString; + } + public void Dispose() { NativeArrayManager.Dispose(); @@ -507,4 +494,4 @@ namespace UniGLTF return false; } } -} \ No newline at end of file +}