A modern plugin management system that brings the NPM ecosystem to Unreal Engine plugin development. UEPM allows you to distribute, install, and manage Unreal Engine plugins using familiar NPM workflows.
- 🚀 One-command setup: Initialize any Unreal project with
npx @uepm/init - 📦 NPM distribution: Publish and install plugins using standard NPM commands
- 🔍 Automatic validation: Engine compatibility checking on every install
- 🔗 Dependency management: Plugins can depend on other plugins with automatic resolution
- 🩹 Patch support: Full compatibility with patch-package for modifications to managed plugins
- ⚡ Lightweight: Only download what you need - init runs once via npx
Navigate to your Unreal Engine project directory and run:
cd YourUnrealProject
npx @uepm/initThis will:
- Add
node_modulesto your project's plugin search paths - Create or update
package.jsonwith UEPM configuration - Install validation hooks for compatibility checking
npm install @uepm/example-pluginPlugins from node_modules will be automatically discovered and loaded!
For a working demonstration:
cd samples/project
npm install
# Open SampleProject.uproject in Unreal EngineThe sample project includes example plugins and demonstrates the complete workflow.
Initialize an Unreal Engine project for NPM plugin support.
Usage:
npx @uepm/init [options]Options:
-f, --force- Force reinitialization even if already initialized-d, --project-dir <path>- Project directory (defaults to current directory)-h, --help- Display help information-V, --version- Display version number
Examples:
# Initialize current directory
npx @uepm/init
# Force reinitialize a specific project
npx @uepm/init --force --project-dir ./MyProject
# Initialize with verbose output
npx @uepm/init --forceValidation hook that runs automatically after npm install. This command is typically not run manually.
Usage:
uepm-postinstall [project-directory]This command:
- Sets up plugin symlinks in the
UEPMPluginsdirectory - Validates plugin compatibility with your engine version
- Displays warnings for incompatible plugins
To create UEPM-compatible plugins, your package.json must include specific metadata:
{
"name": "@your-scope/plugin-name",
"version": "1.0.0",
"description": "Your plugin description",
"main": "YourPlugin.uplugin",
"unreal": {
"engineVersion": ">=5.0.0 <6.0.0",
"pluginName": "YourPlugin"
},
"files": [
"YourPlugin.uplugin",
"Source/**/*",
"Resources/**/*",
"Content/**/*"
],
"keywords": ["unreal", "unreal-engine", "plugin", "uepm"],
"license": "MIT"
}Use semantic versioning ranges to specify engine compatibility:
| Range | Description | Example |
|---|---|---|
">=5.0.0 <6.0.0" |
UE 5.x only | Most common for UE5 plugins |
"^5.3.0" |
UE 5.3+ but not 6.0 | Compatible with 5.3, 5.4, etc. |
"~5.3.0" |
UE 5.3.x only | Patch versions of 5.3 only |
">=4.27.0" |
UE 4.27 and later | Cross-generation compatibility |
"5.3.0" |
Exact version | Only UE 5.3.0 (not recommended) |
Declare dependencies on other UEPM plugins:
{
"dependencies": {
"@uepm/utility-plugin": "^1.0.0",
"@company/base-plugin": "~2.1.0"
}
}Also declare them in your .uplugin file:
{
"Plugins": [
{
"Name": "UtilityPlugin",
"Enabled": true
}
]
}UEPM is fully compatible with patch-package for persisting modifications to plugin source code.
-
Modify plugin source in
node_modules:# Edit the plugin files code node_modules/@uepm/example-plugin/Source/ExamplePlugin/Private/ExamplePlugin.cpp -
Create a patch:
npx patch-package @uepm/example-plugin
-
Commit the patch file:
git add patches/ git commit -m "Patch example plugin for custom behavior"
Patches are automatically applied during npm install thanks to the postinstall script that UEPM sets up:
{
"scripts": {
"postinstall": "patch-package && uepm-postinstall"
}
}- Keep patches minimal - only change what's necessary
- Document your changes - add comments explaining modifications
- Test thoroughly - ensure patches work across different environments
- Version carefully - patches are tied to specific plugin versions
Problem: Running npx @uepm/init in wrong directory.
Solution: Navigate to your Unreal Engine project root (where the .uproject file is located).
cd path/to/your/UnrealProject
npx @uepm/initProblem: Plugin appears in node_modules but doesn't load in Unreal Engine.
Solutions:
- Check the Output Log in Unreal Engine for error messages
- Verify plugin structure - ensure valid
.upluginfile exists - Regenerate project files - close Unreal Engine and regenerate
- Check engine compatibility - run
npx uepm-postinstallto see warnings
Problem: Seeing warnings about plugin compatibility during npm install.
Example warning:
⚠️ Plugin @uepm/example-plugin@1.0.0 may be incompatible
Required: >=5.0.0 <6.0.0, Found: 4.27.2
Solutions:
- Update Unreal Engine to a compatible version
- Contact plugin author for compatibility updates
- Use at your own risk - plugin may still work despite warnings
- Fork and update the plugin for your engine version
Problem: C++ compilation errors after installing plugins.
Solutions:
- Clean and rebuild your project
- Check for conflicting dependencies between plugins
- Verify plugin source compatibility with your engine version
- Review applied patches - ensure they're still valid
Problem: npm install fails with network or permission errors.
Solutions:
# Clear NPM cache
npm cache clean --force
# Delete and reinstall
rm -rf node_modules package-lock.json
npm install
# Check NPM configuration
npm config listProblem: Directory contains multiple .uproject files.
Solution: UEPM will use the first .uproject file found alphabetically. Move to a directory with only one project file, or specify the project directory:
npx @uepm/init --project-dir ./SpecificProject- Check the samples -
samples/contains working examples - Review plugin structure - examine
samples/plugins/for reference - Enable verbose logging - check Unreal Engine's Output Log for details
- Test with sample project - verify UEPM works with
samples/project/
UEPM consists of several focused packages:
- @uepm/init - One-time initialization tool (run via npx)
- @uepm/postinstall - Postinstall hooks for setup and validation
- @uepm/core - Shared utilities for file management
- @uepm/example-plugin - Basic plugin example
- @uepm/dependency-plugin - Plugin with dependencies
- Initialization:
@uepm/initmodifies your.uprojectfile to includenode_modulesin plugin search paths - Installation: Standard
npm installdownloads plugins tonode_modules - Setup: Postinstall hook creates symlinks in
UEPMPlugins/directory for Unreal Engine - Validation: Automatic compatibility checking warns about engine version mismatches
- Loading: Unreal Engine discovers and loads plugins from the configured directories
your-unreal-project/
├── YourProject.uproject # Modified by UEPM init
├── package.json # NPM configuration
├── UEPMPlugins/ # Symlinks to plugins (for UE)
│ ├── example-plugin/ # → ../node_modules/@uepm/example-plugin
│ └── dependency-plugin/ # → ../node_modules/@uepm/dependency-plugin
├── node_modules/@uepm/ # Actual plugin files
│ ├── example-plugin/
│ └── dependency-plugin/
├── patches/ # patch-package modifications
└── Source/ # Your project source
We welcome contributions to UEPM! Here's how to get started:
-
Clone the repository:
git clone https://github.com/your-org/uepm.git cd uepm -
Install dependencies:
npm install
-
Build all packages:
npm run build
-
Run tests:
npm test
Each package can be developed independently:
# Work on the init package
cd packages/init
npm run build
npm test
# Work on the core utilities
cd packages/core
npm run build
npm test- Unit tests: Each package has comprehensive unit tests
- Integration tests: Test the complete workflow with sample projects
- Property-based tests: Verify correctness properties with random inputs
# Run all tests
npm test
# Run tests for specific package
cd packages/init && npm test
# Run tests in watch mode
cd packages/core && npm run test:watchTo contribute example plugins:
- Follow the structure in
samples/plugins/example-plugin/ - Include comprehensive tests for plugin structure and functionality
- Document the example with clear README and comments
- Test with sample project to ensure compatibility
- Fork the repository and create a feature branch
- Make your changes with appropriate tests
- Ensure all tests pass - run
npm testfrom the root - Update documentation if needed
- Submit a pull request with a clear description
- TypeScript: All code should be written in TypeScript
- Testing: Use Vitest for unit tests and fast-check for property-based tests
- Documentation: Include JSDoc comments for public APIs
- Formatting: Follow the existing code style (we may add Prettier in the future)
Releases are managed through NPM workspaces:
- Update versions in affected packages
- Build all packages:
npm run build - Run full test suite:
npm test - Publish packages:
npm publish --workspaces
- Node.js >= 18.0.0
- NPM >= 7.0.0 (for workspaces support)
- Unreal Engine 5.0+ (4.27+ may work but is not officially supported)
MIT - see LICENSE for details.