Example demo project which demonstrates the Arcweave > Unreal integration
Choose one of the two methods below to get the project files.
Option A: Using Git (Recommended)
This is the fastest method as it automatically includes the necessary plugin as a submodule. Run the following command in your terminal:git clone --recurse-submodules https://github.com/arcweave/arcweave-unreal-example.gitOption B: Manual Download (No Git)
If you prefer not to use Git, you must download the project and the plugin separately:- Download the Project: Download Project ZIP and unzip it.
- Download the Plugin: Download Plugin ZIP and unzip it.
- Install the Plugin: Create and move the unzipped plugin folder into the project directory at:
ArcweaveDemo/Plugins/Arcweave
[!TIP] If the
Pluginsfolder doesn't exist yet insideArcweaveDemo, simply create a new folder and name itPlugins.
- Generate Files: Right-click
ArcweaveDemo.uproject→ Generate Visual Studio project files. - Prerequisites: Ensure Visual Studio 2022 and its C++ dependencies are installed.
- Compile:
- Open the
.slnfile. - Right-click Games > ArcweaveDemo and select Build.
- Open the
- Open: Once the build finishes, close Visual Studio and double-click
ArcweaveDemo.uproject.
The arcweave plugin is stored in the project as a git submodule
- Initialization: If you don't see the plugin folder in ArcweaveDemo/Plugins/ folder run
git submodule update --init --recursiveto download the plugin files. - Detached HEAD: When you enter a submodule, you are usually in a "Detached HEAD" state. If you make changes there, remember to checkout a branch (like main) before committing.
The entire logic, assets, and implementation of this demo are organized and stored in the Content->ArcweaveDemo directory. Within this directory, the most crucial class to understand is WBP_HUD_New, which is located in Content\ArcweaveDemo\Widgets. This class provides a comprehensive setup and detailed examples of how to:
-
Fetch Data: Demonstrates the process of retrieving data from the relevant source or API.
-
Preserve User API Tokens and Hash for Packaging: Outlines the steps to securely store and manage user API tokens and hash values, ensuring they are preserved during the packaging process.
-
Extract Data: Shows how to extract and process the data once it has been fetched.
-
Transpile Elements, Objects, Conditions, etc.: Provides examples and guidance on how to transpile various elements, objects, and conditions as required.
By exploring the WBP_HUD_New class and its implementations, you will gain valuable insights into the project's logic and workflow, serving as a practical guide for your own implementations.
There are two primary methods for collecting data:
Web API: This involves fetching data directly from the Arcweave Web API.
JSON Import: For this method, you'll need to import a JSON file from your Arcweave project. Ensure that the JSON file, along with all required assets, is placed in the Content->ArcweaveExport directory. If this directory does not exist, you will need to create it. Also make sure you have enabled to receive data from local JSON in UE Settings > Project Settings > Plugins > Arcweave and you have restarted your UE for the setting to take effect.