Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Getting started using Blueprints

Gersh Payzer edited this page Jul 13, 2017 · 14 revisions

These instructions are written assuming you are building the Unreal Engine from source. If you aren't, don't worry, the steps are almost the same so you can still use these instructions.

Enlist in this repo

Note: This repository contains a git submodule called interactive-cpp. This library is the core C++ SDK for Mixer Interactivity, which the Unreal plugin builds upon.

To clone the interactive-unreal-plugin repository and initialize the interactive-cpp submodule, run the following command:

$ git clone --recursive https://github.com/mixer/interactive-unreal-plugin.git interactive-unreal-plugin

Alternatively, the submodule may be initialized independently from the clone by running the following command:

$ git submodule update --init --recursive

The submodule points to the tip of the branch of the interactive-cpp repository specified in interactive-unreal-plugin's .gitmodules file.

Build the plugin

  1. Go to your Unreal enlistment and navigate to \Engine\Plugins\Runtime.
  2. Create a folder called Mixer.
  3. Go to your enlistment from step 1. Copy everything and paste it in the Mixer folder you created in the previous step.
  4. Go to the root of your Unreal enlistment and run the script: GenerateProjectFiles.bat. This will add the Mixer plugin to the Unreal solution.
  5. Open the UE4.sln and press F5 to build the Mixer plugin and run the Unreal Editor.

Create an interactive project

  1. Go to Interactive Studio (https://mixer.com/i/studio).
  2. Create a new project and name it "HelloWorld". Then click Save.

  1. Click the Build tab at the top of the Interactive Studio Editor as shown in the screenshot below:

  1. Add a new scene called "default".
  2. Add a new control. Make sure the control type is set to button (this is the default). Name the button "giveHealth". This is the string is referenced in your Unreal Blueprints or game code.
  3. Enter "Give Health" as the text property for the button.

  1. Drop the button on the grid.
  2. Click Save.

Linking your interactive project to Unreal

  1. In the Unreal Editor, go to Edit > Plugins to open the Project Settings window.
  2. In the left pane, go to Installed > Misc and select Mixer.
  3. Check the Enabled checkbox, then click the Restart now button to restart the Unreal editor.

  1. Open a web browser and go to Mixer's Interactive Studio to create an OAuth client.
  2. Click the Create new client button to create a new OAuth client.

  1. Fill out the form with these values:
  1. Press Create to create the client.

  1. Go back to the Unreal editor and go to Edit > Project Settings... to open the Project Settings window.
  2. In the left pane, scroll down to the Plugins section and select Mixer Interactivity.
  3. Copy the Client ID of the OAuth client we just created and paste it in the Client ID field.
  4. Type https://www.bing.com in Redirect Uri field.

  1. Click the Login button.
  2. Follow the instructions in the log in dialog to log in to Mixer.
  3. Select your interactive project from the Game Name dropdown.
  4. Select your Game Version Id from the dropdown.
  5. Press the Save local... button. This will make Unreal's Blueprint system aware of the controls in your interactive project.

Logging in to Mixer

  1. Create a new Blueprint. Select Actor as the type and name it "MixerBlueprint".
  2. In the EventGraph, right-click and place a LoginSilently node from the Mixer category.
  3. Connect the event trigger from the BeginPlay event to the input for Login Silently.
  4. Right click on the canvas and add a Get Player Controller object. Connect the return value from the Get Player Controller object to the Player Controller property of the Login Silently object. This identifies the credentials that will be used to authenticate to Beam. This will be the player's Xbox Live token on platforms that support Xbox Live and the OAuth token for the Unreal Editor when using the Editor.
  5. Connect the output of LoginSilently to a StartInteractivity node from the Mixer category.

  1. Right click and search for the string "giveHealth". You will see the button you created in Interactive Studio.
  2. Right click and search for the string "Print Text". Add a Print Text node to the canvas. Change the In Text property to "Health++".
  3. Connect the Pressed output to the Print Text input.

  1. Save and close the Blueprint editor.
  2. Drag your Blueprint on to the scene.
  3. Save and press Play in the Editor to test this out.
  4. Press Shift + F1 to show the mouse cursor. Go to the browser and go to mixer.com/ and you will see a "Give Health" button.
  5. When you click the button, the text "Health++" print to the screen.
Clone this wiki locally