LogoLogo
  • 📘Arcane Mirage Documentation
  • 🚂Quick Start Guide
    • 1. Register and Sign In
    • 2. Prepare Your Unreal Engine Project - Choose your platform
      • 🐧Prepare your Unreal Engine project for Linux
      • 🪟Prepare your Unreal Engine project for Windows
    • 3. Upload your project
    • 4. Share your project
  • Subscriptions & Tokens
    • Subscriptions Plans
      • Free Trial
      • Pixel Artificer - Basic
      • Reality Weaver - Pro
      • Engine Overlord - Pro+
      • Multiverse Exemplar - Enterprise
    • Subscription Features
    • Tokens
  • 🖥️Unreal Engine Setup & Support
    • UE and Pixel Streaming recommendations
    • Adapting your project for Mobile
    • Known Issues in Linux
  • Uploading
    • Uploading
      • Uploading and managing new versions
    • Dedicated Machines
  • Sharing & Embedding
    • Sharing
      • Private Links
    • Embedding to your Website
      • Embedding on WIX
    • Messages to the front-end from Unreal Engine
    • Analytics
  • Project Settings & Configurations
    • General Projects Settings
      • General Settings
      • Description Settings
      • Project Config Settings
      • Session Config Settings
      • Performance Settings
      • Embedding Settings
  • Version Control
  • Advanced Integrations
    • API Access
    • Using Conv AI & Arcane Mirage
    • Using Inworld AI & Arcane Mirage
    • About Multiplayer
  • Accounts & Payments
    • Payments
    • Updating your payment information
  • ❓FAQs
    • General FAQ
    • Unreal Engine Frequently Asked Questions (FAQ)
      • Project upload succesfully to the platform but it disconnects when launching experience
      • My project is not compiling correctly. What could be wrong?
      • Which version of Unreal Engine do we support?
      • Does Lumen and Nanite work in Pixel-Streaming?
      • My mouse is captured by the experience but I can't see the cursor in game
      • How to use Media Textures in Arcane Mirage
      • How to make microphone input work for Pixel Streaming
      • Tips to Optimize your Unreal Engine Projects
      • Can i use the Pixel Streaming 2 plugin?
    • Access our templates through Github
    • How can I rebuild my project?
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Sharing & Embedding

Messages to the front-end from Unreal Engine

Communication Bridge: Linking Unreal Engine to Your Website

Integrating ArcaneMirage Player in Your Website

Arcane Mirage provides a seamless way to communicate from the Unreal Engine project to the front-end of the website hosting the experience. Here's how you can establish this bidirectional communication:

1. Enable Event Passthrough:

First, in the embedded player (arcane-player), add the following attribute to allow events to pass through:

data-enable-events-passthrough="true"

2. Sending Messages to Unreal Engine:

To send events to UE, you can use the following code snippets:

ArcanePlayer.emitUIEvent('CustomUIEvent');

ArcanePlayer.emitUIEvent({
    event: 'CustomUIEvent',
    data: { test: 'test' }
});

3. Receiving Messages from Unreal Engine:

To listen and react to events from UE, implement this:

ArcanePlayer.onReceiveEvent('CustomUIEventResponse', (response) => {
    // custom code logic
    console.log(response);
});

4. Blueprint Configuration:

Ensure that blueprints inside your Unreal Engine project align with Unreal Engine's official documentation:

Example Implementations:

For those looking to integrate the ArcaneMirage player into your web applications, we offer example implementations using both React and plain JavaScript.

React Integration:

To kick off with the React example:

npm install
npm run build

Arcane Player Methods:

The Arcane Player offers a suite of methods to facilitate interaction:

  • play(): Initiates the stream programmatically.

  • emitUIEvent(descriptor): Enables sending events to UE. The descriptor can either be a string or an object.

  • onReceiveEvent(name, listener): Adds listeners for events originating from UE.

  • onPlayerEvent(name, listener): Sets up listeners for events from the player. Events can include: loading, ready, afkWarning, afkWarningDeactivate, and afkTimedOut.

PreviousEmbedding on WIXNextAnalytics

Last updated 1 year ago

Was this helpful?

For more in-depth information you can look at our github repository here:

Communication from UE5 to Player Page
Communication from the Player Page to UE5
https://github.com/ArcaneMirage/ArcanePlayer