Search Issue Tracker
By Design
Votes
2
Found in
2018.4
2019.4
2020.3
2020.3.2f1
2021.1
2021.2
Issue ID
1329712
Regression
No
Using a compiled C# DLL in a Unity project throws a build error
How to reproduce:
1. Open the attached "Repro.zip" project
2. Build "test" scene to Standalone
Expected result: Build succeeds when using a compiled C# DLL in a Unity project
Actual result: Build fails when using a compiled C# DLL in a Unity project
Full error:
ArgumentException: The Assembly UnityEditor.CoreModule is referenced by Magnetic3DUnityCamera ('Assets/Magnetic3D/Magnetic3DUnityCamera.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Reproducible in: 2018.4.35f1, 2019.4.27f1, 2020.3.10f1, 2021.1.8f1, 2021.2.0a18
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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note:
The assembly Magnetic3DUnityCamera.dll references UnityEditor. You are not allowed to include this in a Standalone build as you will not have access to the editor from your player. You can exclude this assembly from your build in the assembly inspector. Click on the assembly in Unity and unselect Any Platform and only include Editor