Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2018.4.26f1
2020.2
Issue ID
1276716
Regression
No
LayerMasks are treated as flags when Serializing a script
Steps to reproduce:
1. Unzip the attached project "Case_1276716"
2. Navigate to Case_1276716->Assets
3. Open "GameObject" in a text editor
4. Notice the "validLayer" and "invalidLayer" has "m_Bits"
Expected results: No "m_Bits" are serialized with LayerMasks
Actual results: LayerMask are treated as flags therefore "m_Bits" are serialized
Reproducible with: 2018.4.27f1, 2019.4.11f1, 2020.1.7f1, 2020.2.0b4
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
Resolution Note:
The behavior is inline with documentation: https://docs.unity3d.com/ScriptReference/LayerMask.html . Let us know if you have further questions, or feedback.