Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.2.X
Votes
0
Found in
2018.4.28f1
2019.4.13f1
2020.1.11f1
2020.2.0a20
2021.1
Issue ID
1288271
Regression
Yes
[IL2CPP] Unity.IL2CPP.Building.BuilderFailedException when building and using Regex in code
How to reproduce:
1. Open "RegexBug.zip"
2. In Project Settings -> Player -> Scripting Backend set IL2CPP
3. Build the project
Expected result: Can successfully build the project
Actual result: Exception: Unity.IL2CPP.Building.BuilderFailedException: D:\UnityProjects\case_1288271-RegexBug\Library\Il2cppBuildCache\Android\armeabi-v7a\il2cppOutput\Assembly-CSharp.cpp:697:57: error: use of undeclared identifier 'L_0' Regex__ctor_m8BB2137D7B0A93CD70FD3061579C7456BB65216E(L_0, _stringLiteral894E5AF8C7FAE49021410D34DB96320832C6DDBD, /*hidden argument*/NULL);
Reproducible with: 2018.4.28f1, 2019.4.13f1, 2020.1.11f1, 2020.2.0a20, 2021.1.0a3
Not reproducible with: 2018.4.27f1, 2019.4.12f1, 2020.1.10f1, 2020.2.0a19
Notes:
- Regex Code that does not allow the project to be built, it is not used anywhere in the scene:
private Regex m_Regex = new Regex(@"[^\\// +-_='.~!?@#$%^&*[\]()a-zA-Z0-9\p{C}\p{So}\u20E3]");
- Does not build for Windows Standalone and Android
- Builds for iOS, but when deploying getting an error regarding REGEX undeclared identifier
- Can build and run on Mac
- Builds on mono
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
- Sprite Preview is broken when the Sprite is too tall or too wide
- Objects are invisible in Scene view when using Wireframe Shading Mode
- The property of a component becomes read-only when it is bound to "PropertyStreamHandle"
- Physics.Raycast does not work when used on the whole model
- Shader Graph changes the Position of Prefab instances in Play mode
Resolution Note (fix version 2021.1):
Fixed in 2021.2.0a3
Resolution Note (fix version 2021.1):
Fixed in: 2021.1.0b5
Resolution Note (fix version 2020.2):
Fixed with: 2020.2.4f1
Resolution Note (fix version 2019.4):
Fixed in 2019.4.21f1