- aliagha.huseynli
- Posts: 44
- Joined:
Error: Unknown element type WebView2
Hi,
I wanna use WebView2 package in unity for my project with noesis gui however i got error. How can I fix it? Thanks in advance.
In blend side I installed webview2 from nuget then I added few lines of code on xaml side:
I wanna use WebView2 package in unity for my project with noesis gui however i got error. How can I fix it? Thanks in advance.
In blend side I installed webview2 from nuget then I added few lines of code on xaml side:
Code: Select all
<UserControl x:Class="WpfApp3_with_Unity.WpfApp3_with_UnityMainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:webview2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf">
<Grid Width="1280" Height="800">
<webview2:WebView2 Source="https://www.youtube.com"/>
</Grid>
</UserControl>
-
sfernandez
Site Admin
- Posts: 3008
- Joined:
Re: Error: Unknown element type WebView2
Hi,
Nuget packages are only visible for the Blend project and won't be available for Unity. And even if you copy the nuget assemblies to the Unity project, they need to be compatible with Unity (not using APIs that are not available in netstandard 2.1).
There were in the past projects like uWebKit that brought WebView into Unity but they seem to be discontinued.
Other customers are just using the native implementation for each platform as an outside process: viewtopic.php?p=5414&hilit=webview#p5397
Could that work for you?
Nuget packages are only visible for the Blend project and won't be available for Unity. And even if you copy the nuget assemblies to the Unity project, they need to be compatible with Unity (not using APIs that are not available in netstandard 2.1).
There were in the past projects like uWebKit that brought WebView into Unity but they seem to be discontinued.
Other customers are just using the native implementation for each platform as an outside process: viewtopic.php?p=5414&hilit=webview#p5397
Could that work for you?
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests