Unity Issue Tracker - ”Assert.IsTrue” is not working when checking if “layerMask.value” is 0 when it’s 0
Closed
UUM-29254
”Assert.IsTrue” is not working when checking if “layerMask.value” is 0 when it’s 0
Unity: Scripting
Won't Fix
2023.2.X
2023.1.X
2022.2.X
2021.3.X
2020.3.X
The expation for Assert.IsTrue is true, and thus the assert is valid and no error should be printed.
How to reproduce:
1. Open the attached “CheckLayer.zip” project
2. Open the “SampleScene” Scene (Assets > Scenes > SampleScene)
3. Enter Play Mode and observe the Console window
Expected result: “AssertionException: Error!” error is printed
Actual result: “AssertionException: Error!” error is not printed