Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.1.10
Issue ID
1208938
Regression
No
Building a prefab using the addressable system with a MenuItem script throws errors when the script is included in an assembly
Steps to reproduce:
1. Open the attached project "Case_1208938"
2. Navigate to Windows-> Asset Management and open the Addressable window
3. In the top menu of the Addressable window select Build-> Build Player Content
4. Notice the errors in the console "The type or namespace name 'MenuItem' could not be found"
Expected results: Assets with MenuItem Scripts are build
Actual results: Assets with MenuItem Scripts are not build if Scripts are stored into an assembly
Reproducible with: 2018.4.16f1(1.1.10), 2019.2.19f1(1.1.10), 2019.3.0f6(1.1.10)
Notes: The user has attached a video of the problem at the start of the report. Unable to reproduce in 2020.1 due to Addressable window failing to load Build->Build-> Build Player Content with 0 compiler errors. Addressable were not present in 2017.4
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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Resolution Note:
The .asmdef is set up wrong. It needs to explicitly be dependent on the editor. This dependency automatically happens if you are not using an asmdef, by putting the code in a folder called Editor. If you use an asmdef you need
"includePlatforms": [
"Editor"
]
This has nothing to do with addressables, and will fail building a player as well.