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.
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.
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.