I am trying to ramp up the emissive brightness when the user presses a button (or moves a controller stick). I had it working with a combination of Dynamic material instance and timeline in the Blueprint editor, but I have found nothing that works in creating a C++ version.
And to make matters worse, if I put some bad code in the C++ file in Xcode and hit compile, it crashes the app and I have to remove the offending code, and trash the Build folder just to get the editor to reopen. >:(
I cannot figure out how to:
1… Access the material that is already set on the mesh.
(Should that material be the regular material or should it be the material instance?)
2… Change the two parameters I created in the material for different brightness floats.
3… Use a timeline or curve to ramp up the material property, then bring it back down when the button is release.
Any help is MUCH appreciated. (I have no code to show because I had to take out the mess I tried.)
Edit: If anyone knows of a working code sample, that would be fantastic.