Loading Circle mask bug

Original example from tutorial - Loading Circle UI | PlayCanvas Developer Site

If initialize does not occur from the very beginning (for example, the object is dynamically activated for the first time from another place), then it does not work.

https://playcanvas.com/project/1212272/overview/loading-circle-test-case

some-manager.js turns on one of the circles after 0.1 seconds after game starting

Looks like a weird initialisation order bug/problem where the material for the element is not set yet when script initialisation is called. So it clones the default image material.

Changing it to postInitialisation works around this.

https://playcanvas.com/project/1212286/overview/f-loading-circle-test-case

1 Like