Search Issue Tracker

Fixed in Unity 2019.1



Found in


Issue ID




[IL2CPP] Project Build process fails due GetObjects function




Priority: 3Not yet prioritized for a release


Severity: 1Crash, freeze, data loss, work stops

To reproduce:

1. Download the attached project "" and open in Unity
2. Open "SampleScene" scene
3. Go to Edit > Project Settings > Player and set Scripting Backend to IL2CPP
4. Build project on Standalone, iOS or Android
5. Observe that Building process fails with these errors:

L2CPP error for method 'System.Object BugBehaviour::GetObject()' in BugBehaviour.cs:30
Additional information: Sequence contains more than one element

Failed running /Applications/Unity/ --convert-to-cpp --emit-null-checks --enable-array-bounds-check --development-mode --dotnetprofile="unityjit" --map-file-parser="/Applications/Unity/" --assembly="/Volumes/livsey-external/projects/il2cpp_gen_bug/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --assembly="/Volumes/livsey-external/projects/il2cpp_gen_bug/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --assembly="/Volumes/livsey-external/projects/il2cpp_gen_bug/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll" --assembly="/Volumes/livsey-external/projects/il2cpp_gen_bug/Temp/StagingArea/Data/Managed/UnityEngine.dll" --generatedcppdir="/Volumes/livsey-external/projects/il2cpp_gen_bug/Temp/il2cppOutput/il2cppOutput"

Exception: /Applications/Unity/ did not run properly!

Build completed with a result of 'Succeeded'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

- This issue appears on Windows, macOS, iOS, and Android
- If Scripting Backend is set on Mono, everything works fine
- On Unity 2018.2 Console even says the Build completed with a result of "Succeeded", but no files are actually written - the destination project folder is empty

Reproduced on Unity 2017.4.0f1, 2017.4.14f1, 2018.1.9f2, 2018.2.15f1, 2018.3.0b9 and 2019.1.0a8

Comments (1)

  1. Eb4a94ea69dad9aefccb15f603058a33?d=mm


    May 15, 2019 10:27

    Still having this issue in Unity2019.1.2

All about bugs

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