Plugin vs Custom Engine when modifying the 4.19 Material System

Okay, so there’s a very important part of the new Material System that, er, isn’t included in 4.19 or 4.20.
In MaterialInstanceDynamic.h, there’s a function that theoretically would allow for dynamic alteration of material layers at runtime, which currently doesn’t work.
/** Set an MID vector parameter value */ UFUNCTION(BlueprintCallable, meta=(Keywords = “SetColorParameterValue”), Category=“Rendering|Material”) void SetVectorParameterValue(FName ParameterName, FLinearColor Value);
void UMaterialInstanceDynamic::SetVectorParameterValue(FName ParameterName, FLinearColor Value) { FMaterialParameterInfo ParameterInfo(ParameterName); // @TODO](https://twitter.com/TODO): This will only work for non-layered parameters SetVectorParameterValueInternal(ParameterInfo,Value); }

Obviously, we want to make this work for layered parameters, even if in very specific cases and even if it’s fragile.
So we want to overload the function with something that works. Not too hard, I don’t think, not too easy, maybe, but within the realm of doable.
The question is, do we need to make a custom engine build for this, which will be really painful for the artists to work with, or can this overloading of a function work if we do it as a plugin? Or would the (lack of code) in the engine take priority?

If you want to modify the behavior of the engine, then you will need a custom build, plugins can only affect derived classes that you created yourself.

You could maybe set up an installed build for the artists to make it less annoying.

That’s what I was afraid of. Hm. Any tips on setting up an installed build? I haven’t tried that.

Not entirely accurate. The engine has a number of hooks that can be accessed by plugins to add functionality or change behavior. Immediate examples of this are map importers and a feature that exists in 4.20 that allows the developer to alter replication.

Hm. https://docs.unrealengine.com/en-us/Programming/Deployment/Using-an-Installed-Build … you know, wish I’d known about this eight months ago.

Well, sure, though there isn’t one for this case and the method isn’t even virtual. So modifying the engine is the only option.