Skip to content

WebGL

WebGL is an environment that runs Unity apps in a web browser without a separate installation. Hive Axyl does not distinguish among browsers such as Chrome, Safari, Firefox, and Edge, and manages them in the Console as a single environment named Web.

WebGL apps are deployed directly to a web server instead of a store. When you update the build on the server, users can access the latest version at its URL.


Roles of Hive Axyl and the app

  • Features provided by Hive Axyl


    Hive Axyl provides the following features for implementing WebGL apps.

    • A dedicated App ID whose Environment is Web
    • An SDK package that includes the WebGL browser runtime
    • A web login session that uses browser popups and postMessage
    • Login, account and authentication, PG payment, service access control, mailbox, and TCB Connector features
  • Tasks the app must implement


    The app must implement the following representative tasks separately from Hive Axyl.

    • SDK initialization with the WebGL App ID
    • Login UI and callback handling that account for browser popup policies
    • Management of login state and guest account recovery information
    • WebGL builds, web server deployment, and behavior verification in supported browsers


Supported environment

The Hive Axyl SDK supports WebGL 2.0 on Unity 6000.0 or later. The latest versions of Chrome, Safari, Firefox, and Edge are supported.

Login behavior may vary depending on browser security policies and whether popups are allowed. Verify the login callback under the same origin and HTTPS conditions as the production service.


Supported features

The WebGL support status for each product is as follows.

Product Supported Notes for WebGL
Login O Web login sessions use a browser popup and postMessage. Because Secure Storage is unavailable, the app must implement its own method for maintaining the login state.
Account and authentication O Features that use server APIs integrate in the same way as in other environments.
Payment O Use only PG payment and specify OrderRequestOs.Webgl as the OS in payment order requests.
Service access control O All three features are called without a session Authorization header, so they are available before login.
Push notifications X Supported only on Android, iOS, and macOS.
Mailbox O Features that use server APIs integrate in the same way as in other environments.
TCB Connector O Features that use server APIs integrate in the same way as in other environments.


Implementation order

  1. In the Hive Console, create an App ID whose Environment is Web and whose Store is Direct distribution.
  2. Install the Hive Axyl SDK and modules that support WebGL, and initialize the SDK.
  3. Implement login with a browser popup and redirect callback.
  4. If payment is required, implement PG payment instead of store payment.
  5. Deploy the WebGL build to a web server and verify the main features in supported browsers.

For details about each step, see Getting started.


Considerations

Consider the following when applying WebGL.

Credential storage

Hive Axyl SDK Secure Storage is unavailable on WebGL. Automatic login that relies on the SDK to persist credentials is also unsupported. To maintain the login state, the app must implement its own storage method.

If you do not store the guest account's GuestPlayerId, GuestToken, and deviceKey separately, you cannot restore the existing account after the browser is closed or its data is deleted.

Payment and push notifications

WebGL apps cannot use Apple App Store, Google Play, or Steam payment Add-ons. Implement payments with PG payment.

Push notifications are not supported on WebGL. Do not include APNs, FCM, or Apple local notification Add-ons in WebGL builds.


Next steps

Get started with WebGL.