Search Issue Tracker

Active

Votes

0

Found in

2018.4.28f1

2019.4.13f1

2020.1.11f1

2020.2.0a20

2021.1

Issue ID

1288271

Regression

Yes

[Mobile] Unity.IL2CPP.Building.BuilderFailedException when building and using Regex in code

Customer QA Onboarding

-

How to reproduce:
1. Open "RegexBug.zip"
2. Build for Android

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

Reproducible when: Building on Android, iOS
Not reproducible when: Building Player on macOS, Player on Windows

Regex Code that does not allow project to be built:
private Regex m_Regex = new Regex(@"[^\\// +-_='.~!?@#$%^&*[\]()a-zA-Z0-9\p{C}\p{So}\u20E3]");

Notes:
- code is not used anywhere in the scene

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.