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?
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.
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.