Search Issue Tracker
By Design
Votes
0
Found in
2017.4
2018.4.10f1
2020.1
Issue ID
1202139
Regression
No
[WebGL][.NET 4.x] String.IndexOf(String,StringComparison) method in Build does not return same results as in Play mode
How to reproduce:
1. Open attached project ("WebGLRePro.zip")
2. Open Player Settings (File->Build Settings->Player Settings...)
3. Set Platform to WebGL
4. Set Scripting Runtime Version to .Net 4.x
5. Build and run the project
Expected result: All Result: x values are 0
Actual result: Some results return -1
Reproducible with: 2017.4.35f1, 2018.4.14f1, 2019.2.15f1, 2019.3.0f2, 2020.1.0a15
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 JobQueue::HasJobGroupIDCompleted when closing the Editor while in Play mode on a specific project
- In "Preferences" section the “SpriteShape” menu item, the details page title “SpriteShape”, and “ControlPoint” entries are displayed as code strings rather than formatted UI strings
- Errors thrown constantly when Virtual Offset Debug is enabled and lighting was baked on AMD machine
- Persistent Memory Leak when reloading domain and using Distance-based Ghost Importance
- HDRP project doesn't render in standalone player when using High stripping
Resolution Note (2020.1.X):
This problem comes from that WebGL builds do not embed .NET resources by default, and the Unicode resources are needed for the case insensitive string functions to work. You can embed them via:
https://docs.unity3d.com/Manual/webgl-embeddedresources.html
We will investigate whether we should embed these resources by default, or at least make the option more accessible and clearer to associate with String/Unicode issues.