Example of use of layers

Hello All,
I am looking to use layers. I want to show all entities at firts but when I select one, I would like to see only this one, and deselect, show all. Has anyone an example of the use of layers. How do you add an object to a layer dynamically?

Thanks

Jpeter.

Layers is probably not the best way to go about this. I would have all the entities in the list and when an entity is selected, iterate through the list, disable all those that don’t are not the entity you’ve selected.

Thanks yaustar. Anyhow, Is there any example of the use of layers ?

I’m afraid there is only the User Manual https://developer.playcanvas.com/en/user-manual/graphics/layers/ and some projects people have made to play around with the feature.

1 Like