-
Notifications
You must be signed in to change notification settings - Fork 19
Getting started using Blueprints
These instructions are written assuming you are building the Unreal Engine from source. If you aren't, don't worry, start with the steps at Working with a pre-built version of Unreal Engine and then pick up these instructions at Create an interactive project.
- Enlist in this repo.
- Go to your enlistment copy the root folder (interactive-unreal-plugin) into \Engine\Plugins\Runtime.
- Go to the root of your Unreal enlistment and run the script: GenerateProjectFiles.bat. This will add the Mixer plugin to the Unreal solution.
- Open the UE4.sln and press F5 to build the Mixer plugin and run the Unreal Editor.
- Go to Interactive Studio (https://mixer.com/i/studio).
- Create a new project and name it "HelloWorld". Then click Save.
- Click the Build tab at the top of the Interactive Studio Editor as shown in the screenshot below:
- 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.
- Enter "Give Health" as the text property for the button.
- Drop the button on the grid.
- Click Save.
- In the Unreal Editor, go to Edit > Plugins to open the Project Settings window.
- In the left pane, go to Installed > Misc and select Mixer.
- Check the Enabled checkbox, then click the Restart now button to restart the Unreal editor.
- Open a web browser and go to Mixer's Interactive Studio to create an OAuth client.
- Click the Create new client button to create a new OAuth client.
- Fill out the form with these values:
- Name: MyOAuthClient
- Website: http://www.mixer.com
- Hosts: *.mixer.com
- Press Create to create the client.
- Go back to the Unreal editor and go to Edit > Project Settings... to open the Project Settings window.
- In the left pane, scroll down to the Plugins section and select Mixer Interactivity.
- Copy the Client ID of the OAuth client we just created and paste it in the Client ID field.
- Type http://www.mixer.com in Redirect Uri field.
- Click the Login button.
- Follow the instructions in the log in dialog to log in to Mixer.
- Select your interactive project from the Game Name dropdown.
- Select your Game Version Id from the dropdown.
- Press the Save local... button. This will make Unreal's Blueprint system aware of the controls in your interactive project.
- Create a new Blueprint. Select Actor as the type and name it "MixerBlueprint".
- In the EventGraph, right-click and place a LoginSilently node from the Mixer category.
- Connect the event trigger from the BeginPlay event to the input for Login Silently.
- 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.
- Connect the output of LoginSilently to a StartInteractivity node from the Mixer category.
- Right click and search for the string "giveHealth". You will see the button you created in Interactive Studio.
- Right click and search for the string "Print Text". Add a Print Text node to the canvas. Change the In Text property to "Health++".
- Connect the Pressed output to the Print Text input.
- Save and close the Blueprint editor.
- Drag your Blueprint on to the scene.
- Save and press Play in the Editor to test this out.
- Press Shift + F1 to show the mouse cursor. Go to the browser and go to mixer.com/[your channel name] and you will see a "Give Health" button.
- When you click the button, the text "Health++" print to the screen.
If you are shipping an Xbox One game, we encourage you to take the following steps.
If you want to share a build of your game with others. For example, you want to give a demo of your Mixer integration to a publisher, we recommend using share codes. Learn how to use share codes here
If you are shipping your game on Xbox One and want to test your Mixer integration without others seeing your game, you can use the test streams feature. To get access to Test Streams, send an email with to [email protected] with the following information:
- Your Xbox Live sandbox
- The mixer channel names of the accounts you will be broadcasting from
Once you have access, you can read more about the feature here.
If you are shipping a game for Xbox One and doing Mixer, we strongly encourage you to read the Mixer and Xbox Live article. It covers common questions developers run into when trying to develop Mixer integration for an Xbox One game.