As of Unity 3.1, it is now possible to browse the web from within the Editor.
Thanks to WebKit being bundled with the Editor application and the new WebView private API.
You might ask:
Is it really that hard to Cmd-Tab to your browser? No, not really. Still though, I cherish the thought of never having to leave the cozy confines of the Unity Editor This could also prove useful for in-Editor Unity Doc search. I intend to extend PixelPlacement’s Doc Search (with his permission) and add the documentation webpage directly to the Editor.
I tried but does not work with Unity 4.
This is the error:
Instance of WebView could not be created Because there is no script With That name.
NullReferenceException: Object reference not set to an instance of an object
WebWindow.InitWebView () (at Assets / Risviel / Editor / WebWindow.cs: 47)
WebWindow.Init () (at Assets / Risviel / Editor / WebWindow.cs: 40)
WebWindow.Load () (at Assets / Risviel / Editor / WebWindow.cs: 31)
@TheGamedevGuru_1 I tried your gist, the web view is showing ok but it gets hidden after the window is docked. Do you know how to get it to show again? maybe by repainting or resizing the web view. Thanks for sharing.
@VoxelBoy do you know if there could be communication in both directions WindowEditor ↔ WebView. i.e. invoking methods in the window editor from a script running in the web view and vice versa.
@rraallvv It might be possible but I haven’t looked into it, to be honest. With a .NET decompiler, you can take a look at what the AssetStore-xxxx classes are doing and maybe figure something out from there.
Is the type “WebView” only available at Unity Editor runtime ? I cant find it in UnityEditor.dll or am i on the wrong track? "WebView is found by Reflection like in the script from Ruben Torres , but even the Visual Studio (2017) Object Browser dosent show it.
Anyone knows in wich .dll/Assembly it originally really is or where it is loaded from and then injected into UnityEditor.dll?
@VoxelBoy , yes i also used DotPeek now, anyway its interesting that VS cant see it, looks like the ObjectBrowser from VS 2017 could use someone taking more care about it, some objects you see some you dont even if they have similiar scopes, smells buggy.
However, looking into UnityEditor.Web triggers me see the abstract-> UnityEditor.Web.WebViewEditorWindow and its implementations