4.7p4 Paper2D need help changing sprite color

So I don’t know if I’m just doing something wrong or there is a bug here, but I can’t seem to change the sprite color at runtime.

The setup: I have a BP with a scene node as root and one flipbook component. By default I have the sprite color set to pure green for testing. I want the guy who spawns this object to determine the color.

So in my construction script, I don’t want the flipbook to play before I’ve had a chance to set the color, so I stop the play, reset the time, and turn off looping, because I don’t want that either. (I also can’t find a way to turn off auto play, but that’s a battle for another day.)

So now the guy who spawn this BP will call the Init function with the desired color. This sets the color and then plays the flipbook. Flipbook shows up always tinted green, ignoring the color I passed in here. The flipbook has the TranslucentUnlitSpriteMaterial if that matters.

Well if anyone else gets stuck on this, I did finally find a work around. It seems you can change the color but only while still in the constructor. I made Tint be a variable that’s exposed on spawn, and called SetSpriteColor in the constructor. This still smells like a bug to me, or at the very least should be documented that you cannot dynamically change the value at runtime. Thankfully my use case doesn’t require further color changes.

Hi Furroy,

What you describe sounds like your Flipbook component has Mobility set to Static. You can’t change things like the sprite color after the component has been registered in that case.

Try changing it to Moveable and you should be able to set the color whenever you want.

Cheers,
Michael Noland