Notifications
Clear all

[Closed] Detecting Layers Hidden

There’s no callback for when the user hides/unhides layers, and I’m wondering if anyone has found any creative ways of detecting those events anyway.

The only thing I can think of is to query the .on state of each layer at some event, and compare it to the previous time it was queried. I’m just not sure what event that should be.

Anyone have any ideas?

1 Reply

So I finnaly settled on using a timer to call a function every half second. In that function I walk through each layer reference and check it’s visibility compared to the previous check.

I hate the idea of doing checks like that so often, but the truth is, unless there are TONS of layers to walk through, the hit to the framerate is effectively nill.