I tried to create an engine plugin that contains some assets and code so I can use those across projects which works fine in the editor but when I cook the project for windows only the code seems to work but the assets won’t get loaded has someone an idea?
CanContainContent is set to true in the uplugin file couldn’t find anything about some other steps I have to do.
Or is an Engine Plugin the wrong approach and I should use a Project Plugin and if so is there an easy way to share it with multiple projects without the need to install it everywhere manually?
Thanks in advance.
2 Likes
After further investigation, I got the content to appear in the packaged Game but only if in this case, the needed material had a reference in a Level. I tried adding the plugin directly to the project and adding the content path as a relative and absolute path into the "Additional Asset Directories to Cook " option in the package settings but a soon as I didn’t have a reference that is present in a level or at in a constructor before the world has to be loaded it seems like unreal optimizes the assets out which nice I didn’t want them to be loaded and also try to force them to load. Maybe someone can give me a hint on how to force unreal to package these assets correctly thanks in advance.
Used unreal engine 4.26.
Steps to reproduce create an empty project and create a content plugin.
Create an asset in the plugins content folder and load it via c++ at runtime
1 Like
Anyone else figured this out?
I found the solution to mine. To make my Engine Plugin’s Content appear, I had to make sure that the plugin is Enabled in my project. I discovered that in the Project’s Plugins that the Engine Plugin I’m needing is not checked/ticked. Ticking that changed my .uproject to enlist the Engine plugin with Enabled = true.
Yeah it’s kind of stupid to overlook that. But it’s typical mistake for me when I just usually enlist in my Build.cs the modules and I get away with it sometimes with just the C++ of the Plugin but without the content.