Fade in / out SKLightNode

Would it be possible to animate a change of the isEnabled property of SKLightNode?
I am explicitly aiming for a fade in / out animation.

Replies

Instead of animating the isEnabled property, you can animate changing the node's alpha value: https://developer.apple.com/documentation/spritekit/skaction/1417673-fadealpha
Hey,
thanks for your response.
Sadly your suggestion doesn't seem to work for me. Should I run the fadeAlpha action on the SKLightNode or the affected SKSpriteNodes?

I am currently using this code:

Code Block
func darkModeChanged(to status: Bool) {
currentSceneNode?.floodLights.forEach({ node in
        node.run(SKAction.fadeAlpha(to: status ? 1 : 0, duration: 1.0))
    })
}


floodLights is an Array holding multiple SKLightNodes.

Post not yet marked as solved Up vote reply of Maci Down vote reply of Maci