I have two static highlight layers both of them contain meshes, what I’m trying to do is turn off one and activate the others and vice versa:
static layer1: BABYLON.HighlightLayer; static layer2: BABYLON.HighlightLayer; ///////////////////// myClass.layer1 = new BABYLON.HighlightLayer("", this.scene); myClass.layer2 = new BABYLON.HighlightLayer("", this.scene); myClass.layer2.isEnabled = false; ///Another script: myClass.layer1.isEnabled = false; myClass.layer2.isEnabled = true;
I would put this on the playground but it’s using the Unity toolkit, and I don’t think it’s specific to the playground.
When I call the enabled from another script it’s not enabling / disabling. I’m not getting any errors and the layers stay exactly the same.