This repo was created to help with generating Unreal Plugins that link to the compiled aws c++ sdks. Creating Unreal Plugins that link to third party c++ libraries can be a pain to get right, so this code will take care of all the boilerplate files you need need to start building with the aws sdk. Currently only windows and android are supported.
To understand the structure of the generated files you need to have some knowledge of how plugins work in Unreal. I recommend reading this page from Epic Games https://docs.unrealengine.com/en-US/Programming/Plugins/index.html.
The generator will generate a plugin with two kinds of modules:
- ThirdPartyModules(TP): -- These are thin wrappers around the different aws sdks -- For example: S3TPModule would be a module that contains the compiled S3 sdk that other modules can depend on to use that sdk.
- ClientModules -- These can depend on multiple different TPModules. -- This is where you should write you logic and expose things to Blueprints
TODO: Add more about this, a diagram, and talk about aws sdk dependencies on the basesdk
You need Python 3.7 or higher.
We are using Jinja2 to generate the files from templates and requests to download the files. Despite there not being many dependencies, I personally recommend using python virtual environments as it is a good habit.
pip install -r requirements.txt
Before you can complete your first commands, you will be required to initialize some settings
- Binaries_Directory: This will be the directory the scripts use to look for the compiled sdks
- Output Directory: This will be the directory that the final plugin will be placed in
You can change these settings anytime by running
python Scripts/plugin-generator.py set-settings
There are currently 220 available sdks so I can not include them all here. To check them run the following command
python Scripts/plugin-generator.py list-aws-sdks
- Download compiled sdks using
python Scripts/plugin-generator.py download-sdks --sdks <comma seperated list of sdks>
command - Compile it yourself (TODO link to blog about how to do this)
From the base directory run:
python Scripts/plugin-generator.py make-plugin
You can pass a file representing your plugin with the --pluginfile
flag. Below is a description of how that file should look.
Plugin is a json of the structure:
{
"plugin-name": "",
"description": "",
"client-modules": [
"ClientModuleJsons"
]
}
client-module is json of the structure:
{
"client-module-name": "",
"TPModules": [
"TPModuleJsons"
]
}
TP-module is a json of the structure:
{
"aws-sdk-name": "",
}
https://github.com/uncetlab/unreal_aws_example_project
TODO: link to blog about how I have implenented some of the clients
- Problem with shutil when on Windows Subsystem Linux (https://bugs.python.org/issue38633)