• RuntimesGodot
  • Color modulation for dynamically added nodes to SpineSlotNode

Hello! I have a question for SpineSlotNode.

I have some text animations that have colors and alpha keys inside the animations. However, the text needs to be added dynamically at runtime, and nodes attached to the corresponding SpineSlot do not inherit the slot color modulation.

My solution is to just animate those modulations in the engine instead with some events signal which is not exactly a clean solution. I'm curious if there's a better way to go about this with all animations done in Spine and have things added dynamically at runtime.

Related Discussions
...

When using a SpineSlotNode to dynamically add nodes at runtime, the nodes do not automatically inherit the color modulation from the slot they are attached to. This is because the SpineSlotNode is designed to allow custom nodes to be inserted into the drawing order of a SpineSprite, but it does not automatically apply the slot's color properties to these nodes.

To achieve the desired effect where dynamically added nodes inherit the slot's color modulation, you would need to manually apply the color and alpha values from the slot to the nodes you attach. This can be done by listening to the animation_event signal or other relevant signals from the SpineSprite to update the color properties of the attached nodes whenever the slot's color changes.

While this approach requires some manual handling, it allows you to keep the animations and color modulations defined in Spine, and only apply the necessary changes to the dynamically added nodes in the engine.