I have this code below, and its suppose to disable a culling mask when I leave the room, and enable a culling mask when i enter. But i dont know how to check the state of the culling mask itself. you can see in the comments below where the question needs to be asked. Really only one of the culling masks need to be checked since they are all suppose to be in the same state.
private void OnTriggerEnter(Collider other)
{
if(inner){
inPortal = true;
friendSmile.inPortal = true;
if (){//cullingmask = on
Debug.Log("going in");
cam.cullingMask = cam.cullingMask^(1<<8);
cam.cullingMask = cam.cullingMask^(1<<10);
cam.cullingMask = cam.cullingMask^(1<<12);
}
}
else{
inPortal = false;
friendSmile.inPortal = false;
if (){//cullingmask = false
Debug.Log("going out");
cam.cullingMask = cam.cullingMask^(1<<8);
cam.cullingMask = cam.cullingMask^(1<<10);
cam.cullingMask = cam.cullingMask^(1<<12);
}
}
}