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
- [WebGPU] clearing 2d array texture only clears first slice
- Particle System Renderer icon is missing in Animation window > Add Property context menu
- [Android] Legacy, TMP and UI Toolkit Input Field language toggle to some non-latin alphabet languages does not work with external keyboard
- Crash on keywords::LocalKeywordState::operator when calling ShaderUtil.GetPasskeywords with ShaderType.RayTracing set as the third parameter
- Inconsistent “Remove property” behavior when removing child properties in Animator 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