How can I allow a material to be changed from the Editor in an Actor Derived Class?
After following and adding to the Procedural Mesh Generation Tutorial on the Wiki I have a procedurally generated Quad, that has UV's and also has a Material assigned to it during Construction. I have added a UPROPERTY for a UMaterial (Now that shows up in the editor). Also in the constructor it is that very material that I load the material into, then "SetMaterial" on my mesh component with. My Class declaration looks like this:
And in the constructor:
When I change the material in the editor it changes the material shown in the properties box, but not on the mesh component of the actor. How do I go about making it change the material on the mesh component of the actor?
What you want is described here:
I've done this myself so I know it works
You can override this function to check for your when your property is changed and then update the component yourself.
the key part is GetNameCPP which = the variable name:
answered May 16 '14 at 10:49 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here