Help! Unreal Engine 5.1.1 programmatically create a UMaterial: deprecated code

FExpressionInput* BaseColorInput = UnrealMaterial->GetExpressionInputForProperty(EMaterialProperty::MP_BaseColor);

		UnrealMaterial->GetEditorOnlyData()->ExpressionCollection.Expressions.Add(TextureExpression);
		BaseColorInput->Expression = TextureExpression;

It works well for me.

3 Likes