Uassets of plugin are not loaded when installed into the engine

I use plugins for my C++ game and I have a plugin that contains C++ code, blueprints and assets. This plugin is installed in the plugins folder of the unreal engine (5.0.2) which I compiled from source. When I add the plugin to the game the content folder of the plugin does not show in the asset browser, but the content folders of plugins that are installed to the games plugin folder are visible. When I try to run the game in the editor everything is fine and all of the assets are loaded. I can also program with the C++ API of the plugin as well with no issues. But when I package the game (Development or Shipping) the assets of the plugin are not packaged with the game. Then when I run the game with the log it displays errors that say ‘Failed to load package’ on some of the assets that are needed for the plugin to run.

The current fix that I have is to install the plugin into the games plugin folder. This correctly packages the assets into the game and then the game runs without issues. This is a suboptimal solution as I need this plugin for multiple projects and installing the plugin everywhere is a huge hassle. Besides when the plugin updates I do not want to update the plugin in all of my games.

I have tried to add additional package and cook directories, but these were unsuccessful as the folder that you want to add needs to be under the content folder.

I do not know if this was intended behaviour of the engine or that this is a bug, which is why I am posting this here. In the installed engine you can install to engine and then the plugin also ends up in the Engine/Plugins/Marketplace folder. I have not tried to see if this also occurs on the installed engine (low on diskspace).

If it is intended behaviour, is there any way that I can also load the assets from the engine’s plugins folder into my game, or am I stuck with installing the plugin everywhere?

1 Like

Hey @Kung_Fu_Donkey!

Just some preliminary questions to cover the bases:

  • Have you looked in Edit → Plugins → Installed to make sure the box next to your installed plugin is ticked.
  • For your content browser, do you have both show engine content and show plugin content checked?

From there you would go to All → Engine → Plugins in your content browser and find the folder you need if you haven’t already.

  • Have you tried creating a “Plugins” folder spelled with capitalization next to your Config and Content folders in your project itself and installing your plugin into that folder?
  • Would you mind sharing the error log you received so that we may see if there is a specific error that needs to be resolved?

Any additional information you can provide will be a big help in solving your problem!

1 Like

Have you looked in Edit → Plugins → Installed to make sure the box next to your installed plugin is ticked.

Yes

For your content browser, do you have both show engine content and show plugin content checked?

Yes, like I said I can see the others and after installing it in the games plugin folder I can see it

Have you tried creating a “Plugins” folder spelled with capitalization next to your Config and Content folders in your project itself and installing your plugin into that folder?

Yes, like I said it works fine after installing it into the games plugin folder

Would you mind sharing the error log you received so that we may see if there is a specific error that needs to be resolved?

Because the build does not pack the assets these are the errors that I am getting at runtime (only 1 of ~30):
LoadPackage: SkipPackage: /glTFRuntime/M_glTFRuntimeBase (0x3574344BE09C2809) - The package to load does not exist on disk or in the loader

M_glTFRuntimeBase is located in the plugin glTFRuntime folder under Content/M_glTFRuntimeBase.uasset

Running into a similar issue for the UXTools for HoloLens 2 development in 5.1.1, did you ever find a fix for this?

Yeah so the fix for this is to just add the Plugin to the game instead of adding it to the Editor, it then adds the assets to the Game. It should also be possible to add the directory of the plugin to added directories of the Game, but you would have to do this for every project that uses the Plugin. It’s an annoying problem IMO, but it is how it is.

@Kung_Fu_Donkey yup worked for me

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.