Closed strangeways-dev closed 11 months ago
hi @imineti
For package install needs System.Runtime.CompilerServices.Unsafe.dll.
But rather than use .package to install unity.webp, I recommand to use upm
You can find manifest.json from {gameproject}/Packages/manifest.json
. than modify to add
{
"dependencies": {
"com.netpyoung.webp": "https://github.com/netpyoung/unity.webp.git?path=unity_project/Assets/unity.webp#0.3.9",
"org.nuget.system.runtime.compilerservices.unsafe": "6.0.0"
},
"scopedRegistries": [
{
"name": "Unity NuGet",
"url": "https://unitynuget-registry.azurewebsites.net",
"scopes": [
"org.nuget"
]
}
]
}
The package is not working even after following the installation instructions from the openUPM: https://openupm.com/packages/com.netpyoung.webp/#modal-manualinstallation
Here's what I get in the console after installing the package:
Library\PackageCache\com.netpyoung.webp@0.3.9\Runtime\NativeLibwebpdemux.cs(112,17): error CS0103: The name 'Unsafe' does not exist in the current context Library\PackageCache\com.netpyoung.webp@0.3.9\Runtime\NativeLibwebpdemux.cs(141,17): error CS0103: The name 'Unsafe' does not exist in the current context
How can I fix this?