bkeiren / AwesomiumUnity

Third-party Awesomium wrapper for Unity3D, wrapping Awesomium's C++ API with a custom C# API and accompanying Unity MonoBehaviour components.
108 stars 74 forks source link

AwesomiumUnity

AwesomiumUnity is a third-party Awesomium wrapper intended for use with Unity3D.

AwesomiumUnity allows you to display and use HTML documents in your Unity3D application. HTML5, CSS, and JavaScript are supported, and rendered views can be displayed anywhere a regular Unity Texture2D can be used. Possibilities for your application include:

The wrapper consist of a custom native code C++ DLL which simply wraps Awesomium's C++ API (requires Unity Pro to use) and a set of C# scripts that interface with this DLL.

The current state of the project is:

Stable, the majority of important features implemented. Other functionality in development, code structure and architecture not completely final.

Projects using AwesomiumUnity

Besides individual users, AwesomiumUnity is also used by some game developers or other companies to integrate the power of HTML5 and web browsing in their application.

The developers of TableTop Simulator by Berserk Games are using AwesomiumUnity in their game for an in-game tablet in the 3D game world, which users can interact with and use to browse the web.

Folders

CppDLL

This folder contains a MSVC solution for the C++ DLL that wraps the Awesomium C++ API. To compile this solution you need to:

If succesfully built, the output will be located at either:

or

AwesomiumUnityScripts

This folder contains the Unity scripts that interact with the native code (C++) DLL and the scripts that are actually attached to components in order to get webpages to render.

The files serve the following purposes:

AwesomiumUnityScripts\Examples

This folder contains simple examples to get you going. In most cases you can simply add one of these example scripts to a GameObject that has been set up to render webpages to see it working.

If an example is accompanied by a folder with the same name as the example script, it means that there is some HTML/CSS/JavaScript code that goes with it. These are generally loaded directly off of GitHub from within the example script.

Using AwesomiumUnity

Getting it to work in the Unity Editor

Note: Due to limitations of Awesomium, AwesomiumUnity requires a 32-bit Unity editor. The 32-bit Unity editor can be selected and downloaded through a dropdown list on the Unity download page.

Getting it to work for a standalone .exe

Note: Due to limitations of Awesomium, AwesomiumUnity requires a 32-bit application (built with a 32-bit editor). The 32-bit Unity editor can be selected and downloaded through a dropdown list on the Unity download page.

External Links