hadashiA / Unio

Unio (short for unity native I/O) is a small utility set of I/O using native memory areas.
MIT License
158 stars 7 forks source link

Unity 2021.3.37 compilation errors #9

Closed andrey-vishnitskiy-hypemasters closed 2 months ago

andrey-vishnitskiy-hypemasters commented 3 months ago

Hi,

I got compilation time errors in the package during import

Unity 2021.3.37

Importing package.json

    "jp.hadashikick.unio": "https://github.com/hadashiA/Unio.git?path=/Assets/Unio#0.1.0",
Library/PackageCache/jp.hadashikick.unio@77c4c4bb39/NativeFile.cs(51,39): error CS1503: Argument 1: cannot convert from 'Unity.Collections.NativeArray<byte>' to 'byte[]'

Library/PackageCache/jp.hadashikick.unio@77c4c4bb39/NativeFile.cs(91,39): error CS1503: Argument 1: cannot convert from 'Unity.Collections.NativeArray<byte>' to 'byte[]'

Library/PackageCache/jp.hadashikick.unio@77c4c4bb39/NativeFile.cs(96,37): error CS1929: 'NativeArray<byte>' does not contain a definition for 'AsSpan' and the best extension method overload 'MemoryExtensions.AsSpan(string)' requires a receiver of type 'string'

Library/PackageCache/jp.hadashikick.unio@77c4c4bb39/NativeArrayBufferWriter.cs(74,20): error CS1929: 'NativeArray<T>' does not contain a definition for 'AsSpan' and the best extension method overload 'MemoryExtensions.AsSpan(string)' requires a receiver of type 'string'

Library/PackageCache/jp.hadashikick.unio@77c4c4bb39/NativeArrayBufferWriter.cs(84,13): error CS1929: 'NativeArray<T>' does not contain a definition for 'AsSpan' and the best extension method overload 'MemoryExtensions.AsSpan(string)' requires a receiver of type 'string'
hadashiA commented 2 months ago

Ah; I hadn't realised that AsSpan was not supported. Fixing in #10.