Course contentsShow
← Unreal Engine Game Development
Lesson 64 of 8801. Foundations and Editor WorkflowFree lesson

Implementing Plugin Content and Asset Integration

Learn to include custom assets, UI, and data tables within your plugins while ensuring they remain accessible to the primary project.

In this lesson, you will learn how to bundle and expose custom assets, UI, and Data Tables within your plugins so they are seamlessly accessible to your primary project.

The Plugin Content Folder

When you create a plugin, a Content folder is automatically generated inside the plugin directory. Unlike your project’s main Content folder, assets here are private by default. To make them visible to the Editor and your main project, you must ensure the "Show Plugin Content" option is enabled in the Content Browser settings.

Referencing Plugin Assets

When you integrate assets like a Data Table or a UI Widget into your plugin, you refer to them using a specific path format. Because plugins are distinct modules, you must use the internal plugin name in your references.

If you have a Data Table asset inside your plugin named DT_ItemData, your reference path in C++ looks like this:

// Referencing a plugin-based Data Table
static ConstructorHelpers::FObjectFinder<UDataTable> ItemDataTable(TEXT("/MyPluginName/Data/DT_ItemData.DT_ItemData"));

Exposing Data to Blueprints

If you want your plugin's Data Tables or UI to be usable by designers in the primary project, keep them in public-facing folders within the plugin. To ensure they are accessible, you should:

  1. Keep the path consistent: Don't move assets around once referenced in code.
  2. Use Data Assets: If you are passing data from your plugin to the main project, UDataAsset is the preferred way to bridge the gap between C++ logic and Blueprint-editable tables.
  3. Handle Soft References: Since plugin assets might load asynchronously, it is best practice to use TSoftObjectPtr or TSoftClassPtr when referencing plugin assets from your primary project's Actors to prevent loading your entire plugin into memory at startup.

By maintaining a clear folder structure within your plugin’s Content directory, you allow the primary project to treat your plugin's assets as native extensions of the game, while keeping the plugin modular and portable for future projects.

Key Takeaway: Plugin assets are external to the main project’s memory space; use specific plugin-path string references and soft pointers to safely bridge your modular content with the primary game logic.