dojo.unreal
Overview
dojo.unreal is the official Unreal Engine 5 SDK for interacting with Dojo worlds to develop mobile and desktop 2D and 3D games.
Prerequisites
Before getting started, you should ensure you have Epic Games Launcher installed to install Unreal Engine 5.
Setting up dojo.unreal sdk
To get started with the dojo.unreal SDK, follow these steps:
Download dojo.unreal:
Obtain the Dojo plugin by visiting dojo.unreal. Either clone the repository or download it as a ZIP file to access the plugin.
Set Up Your Unreal Project:
Launch Unreal Engine 5 and create a new project or open an existing one where you'll implement dojo.unreal.
Import the Plugin:
-
Navigate to your project directory by right-clicking the project in Epic Games Launcher (Unreal Engine > Library > My Projects)
-
Create a Plugins directory if one doesn't exist
-
Copy the Plugins/Dojo directory from dojo.unreal into your project's Plugins folder
-
Verify the plugin version in
Plugins/Dojo/Source/Dojo/Dojo.Build.cs
. For version updates or platform-specific deployments, refer to Update the plugin or Add a new platform respectively. -
Enable the Dojo plugin by adding
"Dojo"
to thePublicDependencyModuleNames.AddRange
list inSource/DojoBookTest/PROJECTNAME.Build.cs
-
Generate bindings using
sozo build --unrealengine
and add the resultingDojoHelpers.cpp
andDojoHelpers.h
toSource/PROJECTNAME
-
Regenerate project files (see Regenerate project files for detailed instructions)
Configure the Project:
-
Open your project in Unreal Engine 5 to initiate the rebuild
-
Create a new blueprint
-
Initialize the DojoHelpers actor and store it as a variable
-
Implement Torii connections and other desired functionality
-
Launch the game and verify the connection in the Output Log
Regenerate project files
-
Delete the following directories if they exist:
- Binaries/
- Saved/
- Intermediate/
- DerivedDataCache/
-
Generate fresh project files based on your platform:
Windows
- Right click on your project file
ProjectName.uproject
- Select "Generate Visual Studio Project Files"
- Or run this from PowerShell:
& 'C:\Program Files\Epic Games\UE_5.5\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe' -projectfiles -project="$PWD\ProjectName.uproject" -game -engine
Mac
Open Terminal in your project directory and run:
# For UE 5.5
/Users/Shared/Epic\ Games/UE_5.5/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh -project="$PWD/ProjectName.uproject" -game
# For other UE versions, adjust the path accordingly
Linux
Run from project directory:
~/UnrealEngine/Engine/Build/BatchFiles/Linux/GenerateProjectFiles.sh -project="$PWD/ProjectName.uproject"
Update the plugin
To update the plugin to a new version:
- Build the dojo.c library for your platform
- In your UE5 project directory, create a new directory next to Dojo.Build.cs named after your version number (e.g. "1.3.1")
- Copy the dojo.h header file into this new version directory
- Create a lib/ subdirectory and copy the libdojo_c library file into it
- Update the Dojo.Build.cs file to reference your new version number
- Regenerate the project files following the instructions above
Add a new platform
To add support for a new platform:
-
Build the dojo.c library for your target platform:
- Use
cargo build --release --target <target>
- Common targets include:
- iOS:
aarch64-apple-ios
- Android:
aarch64-linux-android
- Windows:
x86_64-pc-windows-msvc
- Mac:
aarch64-apple-darwin
- iOS:
- Use
-
Create the platform-specific directory structure:
- Navigate to your version folder (e.g.
1.3.1/
) - Create
lib/<PLATFORM>
directory (e.g.lib/iOS
,lib/Android
) - Platform names should match Unreal's naming conventions
- Navigate to your version folder (e.g.
-
Copy the built library files:
- Place the compiled library in the platform directory
-
Update Dojo.Build.cs:
- Add platform-specific conditional logic if needed
- Add library path definitions for your platform
- Test compilation for the new platform