Quick Start Guide

This guide describes the features of the Prysm integration in Unity3D. A basic understanding of the Unity3D engine, as well as HTML/JavaScript is assumed.

Brief overview of Prysm

Prysm 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 CohtmlUISystem 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.


Prysm 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:

  1. From the menu bar choose Assets -> Import package -> Custom package
  2. Navigate in the file chooser dialog to the folder with your Prysm package.
  3. Click Open and a Unity3D dialog with all files of the package files listed should open.
  4. Click Import.
Currently the default Scripting Runtime Version for Unity3D is .NET 4.x , but Prysm only supports .NET 3.5. In order to change the default version you should go to Edit > Project Settings, then select the Player category and change the Configuration to .NET 3.5. More info here.

The trial version includes a 30 day trial license key. After the key expires you won't be able to initialize Prysm 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/Cohtml/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 Prysm.

The trial and pro packages contain different libraries. When upgrading to pro from trial, you should reimport the pro package and replace the libraries.

Package contents and structure

The package has the following structure:

  • Gizmos/Cohtml - icons only for Unity Editor integration.
  • Cohtml - contains samples and documentation.
  • Plugins - contains the Cohtml libraries. These are automatically copied when building.
  • Standard Assets/Cohtml - contains the Prysm integration classes. You'll find a Detail folder inside which contains classes that are internal for the implementation and are used by the "public" classes. The interface you should be using is outside the Detail folder:
    • CohtmlView.cs - component used for displaying html pages.
    • CohtmlUISystem.cs- component used to initialize and manage the UI.
  • StreamingAssets/Cohtml/UIResources - contains the UI resources for Prysm. These are automatically copied when building.
If you want to uninstall the package you should remove the folders listed above. Exception is the Plugins folder when you have other plugins there.

[Planned] Uninstall option in the Prysm menu

Add Prysm view to your scene

In Prysm 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/Cohtml 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 Prysm (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.

If you have a space in the name of your project, this could forestall the HTML from loading.