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.