Supply Materials within Plugin

For my recent project I am implementing a PostProcess material, which is used for outlining MeshActors as a highlighting effect. This feature is to be added to a plugin that I am currently working on.
I don’t want to have everyone using my plugin, to manually import this material. Hence, I am looking for a way to integrate it into my plugin, at best in a cross-version compatible way.

There seem to be experimental features for putting Content into plugins. But I am not sure if and how that would work for me, especially since .uasset files are hardly cross-version compatible.

I also read a wiki post about creating custom HLSL shaders. This seems to be a complicated feature for adding custom shaders from applications outside Unreal. Is there an easy way to copy/paste the HLSL code from the material editor “Window” > “HLSL Code”, then save it in a separate file and load it as a custom shader (from inside the plugin)?

When a new version of the engine is released, you’re required to update your plugin if it’s on the marketplace anyway. I wouldn’t worry too much about cross-version compatibility if you intend to keep it updated.

Okay, makes sense. Can you suggest a good way to distribute materials along with the plugin?

Not sure, but plugins have an option in their uplugin which says, “allow content in plugin” or something. Set that to true and just stick a content folder in there?

I have never seen it published anywhere that the 'content plugins" were supported yet.

Just upload the uassets somewhere and have the user download the appropriate ones when they get the plugin?

They don’t officially. Or better to say:

Content in plugins is a
work-in-progress feature that is not
recommended to use yet.

  • See the link in my original post

yeah I guess that’s the obvious solution. I was just hoping there might be something more elegant. I am generally not a fan of “download this, than add that, make sure that…”. I might look into the content plugin functionality, even if it is not recommended yet.

Best bet is to just actually email epic support and ask.

good call, especially because sharing .uasset files can be a bit of a EULA violation anyway.

I would definitely talk to Epic about it, at this point in time, I don’t think that “content” is supported.

There would be one way around it, though, and that is not to think in terms of a “uasset”, but to actually have the C++ code create the asset at run time. Assuming of course it’s not that horrendous to create, etc.

I have considered doing this, because my Plugin has a need for a “invisible” (i.e. it will never be seen, it just gives definition to a spline mesh component) static mesh, such that it would be fairly easy, and take mere milliseconds, to create at run time.

Hi Vagabond
Did you get an answer from EPIC about how to incorporate materials into a plugin, and if there are any EULA issues?

Asking because I’m thinking my plugin will require packaged materials as well.