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?