mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-19 17:27:56 -05:00
Use new ArraySegment<byte>(Array.Empty<byte>()) instead of default(ArraySegment<byte>)
`default(ArraySegment<byte>).ToArray()` throws `InvalidOperationException` since Unity 2021. It fails `VRMTextureEnumerateTests`. Use `new ArraySegment<byte>(Array.Empty<byte>())` instead. Confirmed to work with Unity 2020.3.34f1, 2021.3.13f1 and 2022.1.23f1. fixes https://github.com/vrm-c/UniVRM/issues/1934
This commit is contained in:
parent
84db84bc2e
commit
b2b11dc6f3
|
|
@ -59,7 +59,7 @@ namespace VRM
|
|||
},
|
||||
}
|
||||
},
|
||||
default
|
||||
new ArraySegment<byte>(Array.Empty<byte>())
|
||||
))
|
||||
{
|
||||
var vrm = new glTF_VRM_extensions
|
||||
|
|
@ -122,7 +122,7 @@ namespace VRM
|
|||
},
|
||||
}
|
||||
},
|
||||
default
|
||||
new ArraySegment<byte>(Array.Empty<byte>())
|
||||
))
|
||||
{
|
||||
var vrm = new glTF_VRM_extensions
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user