Getting Started

Requirements, Installing the plugin and opening the overlay.

Pre-Requisites

To use the Emergence Unreal Engine plugin, you will need the following:

Installation

We have a sample project if you just want to skip to seeing everything working, check it out here!

Extract the Emergence plugin zip file to your game’s plugin folder (if you don’t have a plugins folder, just create one called “Plugins” at the root folder of your game e.g. one one with Source, Saved, Content, etc). Extract the zip to this folder. It should look something like [Your Game]/Plugins/Emergence/Emergence.uplugin, for example.

Open your project. You may receive a window that looks like this:

Press yes and wait for it to compile the modules. Your project should open (if it doesn’t, please send us the build log from [Your Game]\Saved\Logs).

When your game project opens, the plugin should be automatically enabled.

If you wish to use Emergence's C++ API from you're game's code, you'll need to:

  • Add the Emergence module

  • Set the C++ standard to 17 or higher

to you're games Build.cs file, for example:

using UnrealBuildTool;

public class EmergenceUEExample : ModuleRules
{
	public EmergenceUEExample(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
		CppStandard = CppStandardVersion.Cpp17;
		PublicDependencyModuleNames.AddRange(new string[] { 
			"Core", 
			"CoreUObject", 
			"Engine", 
			"InputCore", 
			"HeadMountedDisplay", 
			"Emergence" 
		});
	}
}

The plugin is made up of two parts, the plugin itself (written in C++ and blueprint widgets) and a local server that performs WalletConnect and blockchain interactions (written in C#). For your game to be able to use any of the plugin’s functionality, the server must be running. As of Emergence 0.3.0, the server starts with your game automatically, and closes when your game closes automatically. The server also periodically checks that the game is still open and will close after a while if the game is found to no longer be running, like for example in the case of a crash / rage-quit.

Opening the Overlay

In the following example, we mapped opening the overlay to a keypress of Z (use whatever key you feel best fits your game). This blueprint has been created inside the PlayerCharacter, which is why it has a "Get Controller" node at the top left. There is no need to worry about how the player closes the overlay, that is handled for you by the overlay itself. To get the "Emergence" node, search "Get Emergence Service", then drag off of the Emergence node to find the "Open Emergence UI" node.

Remember to set the Emergence UI class to Emergence UI BP!

At this point, you can now run your game and your users will be prompted with the UI to connect their wallet. Users can then create, edit and load in their personas into your game! Welcome to the world of Web3 and Interoperability!

We recommend checking out these two Tutorials to keep going:

Last updated