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
- Tile Palette grid is moved after entering Play Mode
- Tile Palette Edit mode turns off in Play Mode
- The Editor crashes when Generating Font Atlas in the Font Asset Creator with “9999999999” padding and 256x256 Atlas Resolution
- [iOS] An “ArgumentNullException” error is thrown when GetIntroductoryPriceDictionary() method is called
- Font Import Settings documentation page is missing when the documentation button is pressed in the Inspector window
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