Hello,
I’ve managed to get a custom shading model working on a modified source version of UE4 but I’m wondering if it is possible to transfer this into a plugin so that I don’t have to re-build the engine every time I make a change and to make it easier to share with other people.
Also if you happen to know an easier way of adding a custom shading model or an easier way to do cel-shading with multiple coloured lights, help would be much appreciated.
(I’m on version 4.25)
Thank you.
In order for you to easily package your changes into a plugin, then all of your custom behavior must be implemented in the appropriate subclass. (Ex. Making changes and overrides to AMyActor over the Ue4 class AActor.)
To begin making a plugin, you go to Edit->Plugins->New Plugins. Ue4 will create Build.cs and .uplugin files for you. Note that if you want a blueprint library, select that option as BP static library’s need to be loaded earlier than plugins without BP function libraries.
While the editor does provide ways to swap custom derived classes over default classes, I don’t know if everything you need will be exposed. Then you’ll have to learn how to script the editor, but that is a path I’m not familiar with.
Hi, Thank you for your reply.
How would I go about doing this as the changes are made in multiple files in the source code of the engine?
Thanks.
Make a subclass for each relevant class with overridden behavior, and implement your overrides.
What if it’s in a .ush or .usf shader file? How would I override that?
Don’t worry about answering that I think I’ve figured it out.
Ok. Two more questions(there may be more). How do I override a .h file? And for files in different modules in the source code (the engine source version), Do I have to make a new module named the exact same in the plugin?
And to be more specific, one of the things I need to do is add another member to an enum in the EngineTypes.h file. Is this possible in a plugin?