This guide describes the features of the Hummingbird integration in Unity3D. A basic understanding of the Unity3D engine, as well as HTML/JavaScript is assumed.
Hummingbird is a modern user interface middleware solution that allows you to integrate HTML pages built with CSS and JavaScript in your game. The communication between your game and the HTML engine is done through the HummingbirdUISystem
component. Each HTML page is called a View
. The View
component allows you to perform operations on the page, such as resizing, navigating to a different URL, sending input events and so on.
Hummingbird for Unity3D is distributed in a unitypackage file. You can import this package in your project by either double-clicking on it, or by importing it through Unity in the Project window.
First, open your project in Unity3D Editor, then:
The trial version includes a 30 day trial license key. After the key expires you won't be able to initialize Hummingbird and an error message will be logged in the console.
The pro version requires entering your license key first. The license key is located at Standard Assets/Hummingbird/Detail/License.cs. You should've received this file already prefilled with your license key when you bought the pro version. Replacing the existing empty License.cs file from the package with the provided one will activate Hummingbird.
The package has the following structure:
[Planned] Uninstall option in the Hummingbird menu
In Hummingbird there are two types of views - Screen and World views, the first is used for HUDs and menus, while the latter can be used for in-game UI (interactions between the player and the game). Let's start by creating and displaying a simple HTML page - call it HelloHTML.html
Create an HTML file and place it in the UIResources folder (By default, this is the Assets/Streaming Assets/Hummingbird folder.). The page will be displayed instead of a HUD, so click on the MainCamera
(it will be the GameObject
on which the html will be attached), open Hummingbird (in the main menu) and choose Add Screen View. Go to the Page
property of the view and set the relative URL of the HelloHTML page here, for example: coui://uiresources/HelloHTML.html
. Click Play and you'll see the result.