Search Issue Tracker
By Design
Votes
0
Found in
2021.3.44f1
2022.3.48f1
6000.0.21f1
Issue ID
UUM-82540
Regression
No
The "StringComparer.InvariantCultureIgnoreCase.GetHashCode()" returns different Hash Codes for the same word with the only difference being case sensitivity in WebGL
How to reproduce:
1. Open the “poc-strcmp“ project
2. Open the “SampleScene“
3. Build and Run for WebGL
4. In the first TextField enter “FOO“
5. In the second TextField enter “foo“
6. Click on the “Compare“ button
7. Observe the numbers under the “{{InvariantCultureIgnoreCase.GetHashCode}}“ label
Expected result: Numbers are the same
Actual result: Numbers are different
Reproducible with: 2021.3.44f1, 2022.3.48f1, 6000.0.21f1
Reproducible on: macOS 14.6.1 (Intel), Windows 10 Pro (22H2)
Not reproducible on: No other environments tested
Note: Not reproducible in the Standalone build and Editor, so far only reproduces in the WebGL Player
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
Thank you for reporting a bug to Unity.
On the Web Platform we exclude the culture/language resources which are required for case insensitive comparisons/hashes. If your code depends on the presence of embedded resources, you will need to include them in the build by enabling PlayerSettings.WebGL.useEmbeddedResources. See https://docs.unity3d.com/Manual/webgl-embeddedresources.html
Today we will be closing this case as designed. Thank you again for taking the time to report this issue.