Skeleton Viewer enabled by default

I’m using the Skeleton Viewer as shown in the demo on the tutorial. In the playground, notice in line 22, the skeleton viewer is enabled by doing

skeletonViewer.isEnabled = true; // Enable it

For my use case, I want to toggle the skeleton viewer off by default. So I tried setting isEnabled = false in this line. Turns out that this actually continues to render the skeleton. But at a later point in time (I am assuming after some initialization steps or after first render maybe?), I am able to toggle the rendering using isEnabled with no problems. Am I missing something or is this a bug?


Welcome aboard!

It seems there’s a bug, isEnabled is false after construction time whereas the skeleton is visible. You should call skeletonViewer.isEnabled = true; and skeletonViewer.isEnabled = false; in a row to set the value to false the first time.

Pinging @Pryme8 who is the creator of the skeleton viewer.

1 Like

Perfect! Thanks you Evgeni. Looking forward to the fix. Until then I will use the hack you suggested :).

If I get a chance ill fix it here, sorry I have stacked with work right now.

Can you create an issue so we don’t forget about it (And I or @Evgeni_Popov will probably fix it later)

It looks like this line short circuits if isEnabled is already false, which is set to false by default. It seems like isEnabled should default to true instead because the constructor always binds the function to draw the lines.

Will fix that!

Agh I was hoping to make my first open-source contribution but you already beat me to it. Stop being so good at your job :sweat_smile:.

1 Like