We can use this code to get the status of this layer.
runtime.getLayout("Game").getLayer("BuildingLayer")?.isSelfAndParentsVisible
So how do you switch the state of the layer through the code?
like this ?
runtime.getLayout("Game").getLayer("BuildingLayer")?.SetSelfAndParentsVisible=true
Is there such a function?
By the way, we also need to switch the state of behavior, such as switching on or off.