[Issue] `WebBrowserClient` does not contain a definition for `LogWarning`
What platform are you experiencing this issue on?
Windows
What architecture is your platform?
64-Bit
What version of UWB are you using?
Preview GitLab Package
What Unity version are you running?
2021.3.2f1
Describe what the issue you are experiencing is.
When I import the newest package following the instructions I receive this error:
Library\PackageCache\dev.voltstro.unitywebbrowser@7ab688c164\Runtime\WebBrowserUI.cs(333,39): error CS1061: 'WebBrowserClient' does not contain a definition for 'LogWarning' and no accessible extension method 'LogWarning' accepting a first argument of type 'WebBrowserClient' could be found (are you missing a using directive or an assembly reference?)
Provide reproducible steps for this issue.
- Create a new 2021.3.2f1 project.
- Follow instructions in readme https://github.com/Voltstro-Studios/UnityWebBrowser/blob/01c1020ffc41aedadacbd6b10053b646e1be85f1/README.md:
Open up the package manager via Windows -> Package Manager
Click on the little + sign -> Add package from git URL...
Type https://gitlab.com/Voltstro-Studios/WebBrowser/Package.git#2.x and add it
Type https://gitlab.com/Voltstro-Studios/WebBrowser/Package.git#engine/cef/base and add it
Type https://gitlab.com/Voltstro-Studios/WebBrowser/Package.git#engine/cef/win-x64 and add it (If you need Windows support)
Type https://gitlab.com/Voltstro-Studios/WebBrowser/Package.git#engine/cef/linux-x64 and add it (If you need Linux support)
Unity will now download and install the package
- Boom! Issue.
Any additional info you like to provide?
No response
I think this issue has something to do with the package manager and the way its fetching things off gitlab.
I think the package manager is probably just grabbing an out of date package because it looks like the WebBrowserUI shouldn't be showing up in the latest version.
OK! That's the case -- https://gitlab.com/Voltstro-Studios/WebBrowser/Package is out of sync with the rest of the project (which makes perfect sense since its still in development) the only problem is that its also not functional right now.
My workaround for now is to include a fork of the project as a submodule of my project and import the packages from there.
I just had a look at it, it is due to a call to a LogWarning method that no longer exists, but the issue only happens if you are using the old input system (If you switch to the new input system you won't have this issue), since it only in that compiler define. The reason why this was never caught by me, is at the time the Linux version only supported using the new input system, and I do all my devlopment on Linux, so when I did a refactor is must of not caught this.
The GitLab package is quite out of date, and I don't want to push a new version to it as I want to completely ditch using GitLab for package hosting for many reasons.
If you want to mitigate this issue for now, either use the new input system, or build the version in the repo, and copy the packages you need from /src/Packages to <Your Project Dir>/Packages, which Unity will then automatically add.
You will also need to add the OpenUPM scoped registry for the new version, due to the dependencies on UniTask and VoltRpc, so add the scoped registry to your manifest.json file like so:
"scopedRegistries": [
{
"name": "OpenUPM",
"url": "https://package.openupm.com",
"scopes": [
"org.nuget",
"com.cysharp.unitask"
]
}
]
Once the full release is done, it should be as easy as just adding my package registry, and it will already have all the dependencies mirrored in the registry, as well as all the UWB packages, so you don't have to add them one at a time from a git URL.
Thank you!
Adding that scoped registry worked perfectly!
Issue should now be fixed in the latest release.