- Home /
Is it possible to view a webpage in the webplayer using just c#
I know there are other projects like htmltexture and one that uses webkit that will never run on the webplayer because they must accesss C++ files. But is it theoretically possible to make a browser or html viewer in the webplayer to use as a web 2.0 GUI using just .NET and C# routines? Unity 3.0 can now access managed dlls which I think means it can use dlls that are written entirely in C#?
Is it possible to make something that would allow a user to view and interact with an html/javascript page in the webplayer for a GUI.
Thanks Dan
Answer by Bunny83 · May 21, 2011 at 09:21 PM
If the whole thing is written in managed code, yes. But keep in mind all the rendering and all other stuff have to be done with functions that are supported by the webplayer.
I don't think that there is any assembly out there that will work in the webplayer... It's even crazy to implement a JScript interpreter in C# and run the whole thing in the webplayer in a browser...
Why do you need something like that? Do you want to fool the user? or what? Who needs a browser in a browser?
I want to use the html page inside the webplayer for a GUI. It's so easy to build excellent GUI's now using html and javascript frameworks like Dojo, ExtJS and jquery. I don't think anything unity could come up with on their own for a GUI system would ever come close to what's possible with these frameworks. If it can run inside the webplayer it might also run on the iphone or ipad. I'm just looking for a universal GUI solution that is great for building web 2.0 style applications with Unity.
No way, such an interpreter wouldb't be very fast and it's definately easier to use a Unity GUI system. Even on iPhone/iPad such a system would be a total overkill. Html render engines like gecko are huge. It's not just a 3$$anonymous$$ dll file that would go in several $$anonymous$$B and if you do it all in managed code i guess even larger :D. Everything just to display a GUI? How would you interact with your actual game? JScript engines also run in a sandbox. With Unity you have a 3D engine so in the end you can do much more than with html/JScript.
While HT$$anonymous$$L and Dojo etc have their place, using them to try to render a GUI at 60fps like Unity GUI does (as well as actually run your game!) shows the difference in the domains for these technologies. Personally, I find Unity GUI awesome, and I used to work on Qt and Q$$anonymous$$L.