@uepm/dependency-plugin
v1.0.5
Published
Plugin demonstrating dependencies on other NPM plugins
Maintainers
Readme
@uepm/dependency-plugin
Unreal Engine plugin demonstrating dependencies on other NPM-distributed plugins.
Installation
npm install @uepm/dependency-pluginThis will automatically install the required dependency:
@uepm/example-plugin- The plugin this one depends on
Prerequisites
Your Unreal Engine project must be initialized for UEPM:
npx @uepm/initWhat's Included
This plugin demonstrates:
- Plugin dependencies - How to depend on other NPM plugins
- Dependency resolution - Automatic installation of required plugins
- Cross-plugin communication - Using functionality from other plugins
- Proper dependency declaration - Both in package.json and .uplugin
Plugin Dependencies
NPM Dependencies (package.json)
{
"dependencies": {
"@uepm/example-plugin": "^1.0.0"
}
}Unreal Engine Dependencies (.uplugin)
{
"Plugins": [
{
"Name": "ExamplePlugin",
"Enabled": true
}
]
}Plugin Structure
@uepm/dependency-plugin/
├── DependencyPlugin.uplugin # Plugin descriptor with dependencies
├── package.json # NPM package with dependencies
├── Source/ # C++ source code
│ └── DependencyPlugin/
│ ├── Private/
│ │ ├── DependencyPlugin.cpp
│ │ └── DependencyPluginModule.cpp
│ ├── Public/
│ │ ├── DependencyPlugin.h
│ │ └── DependencyPluginModule.h
│ └── DependencyPlugin.Build.cs
└── README.mdEngine Compatibility
- Unreal Engine: 5.0.0 or later (< 6.0.0)
- Platforms: All platforms supported by Unreal Engine
- Dependencies: Requires ExamplePlugin to be available
Usage in Unreal Engine
- Install the plugin via NPM (dependencies install automatically)
- Open your project in Unreal Engine
- Go to Edit > Plugins
- Find "Dependency Plugin" in the list
- Enable the plugin (ExamplePlugin will be enabled automatically)
- Restart the editor when prompted
The plugin will log messages showing the dependency relationship:
LogExamplePlugin: Example Plugin has been loaded!
LogDependencyPlugin: Dependency Plugin has been loaded!
LogDependencyPlugin: Successfully found and using ExamplePlugin functionalityDependency Management
This plugin shows how UEPM handles plugin dependencies:
- NPM-level dependencies - Ensures required plugins are downloaded
- Unreal Engine dependencies - Declares plugin dependencies in .uplugin
- Build system integration - Links against dependency modules
- Runtime dependency checking - Verifies dependencies are available
Creating Dependent Plugins
To create your own plugin with dependencies:
- Add NPM dependency in package.json
- Declare Unreal dependency in .uplugin file
- Add module dependency in Build.cs file
- Include headers from dependency plugin
- Test dependency resolution during development
Best Practices
- Always specify compatible version ranges for dependencies
- Test with and without dependencies to ensure proper error handling
- Document dependency requirements clearly
- Use semantic versioning for your plugin releases
License
MIT
