Search Issue Tracker
By Design
Votes
0
Found in
2018.1.0b9
2018.2.4f1
Issue ID
1073592
Regression
Yes
Package Manager tries to include Editor scripts in builds
To reproduce:
1. Open the user's attached project
2. Add the "Dummy" scene to the Build Settings
2. Try building a standalone for Windows or Mac or Linux
Expected result: The editor only scripts are not included in the Build
Actual result: Unity tries to include the editor only script in the build which results in an error
[Project Dir]/CustomPackages/EditorScriptPackage/Editor/SampleEditorScript.cs(5,3): error CS0246: The type or namespace name `MenuItem' could not be found. Are you missing an assembly reference?
Reproduced with: 2018.1.0b9, 2018.1.9f1, 2018.2.5f1
Not reproduced with: 2017.4.9f1, 2018.1.0b8
Regression started in 2018.1.0b9
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
By design: Packages rely on .asmdef files to know if a script is an Editor script or runtime script. In 2018.2, scripts not mapped to an .asmdef would default to runtime scripts. In 2018.3, this has been clarified and .asmdef files _must_ be present; scripts not mapped to an .asmdef will not be compiled and a relevant warning will be output to the console.