Engine Plugin Content is not in packaged game but code is.

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.

1 Like

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