Editor Files inside of Editor folder still cant build

Hello,

I’m the creator of the Unity asset Basic Mesh Combiner, and I’m currently facing issues with building the project. Despite creating the package correctly and ensuring the use of namespaces, I’m encountering the following errors during the build process:

link again: Basic Mesh Combiner - Easy, Scene Mesh Merge & more | Modeling | Unity Asset Store

“Assets\BasicMeshCombiner\Editor\BasicMeshCombinerEditor.cs(11,44): error CS0246: The type or namespace name ‘EditorWindow’ could not be found (are you missing a using directive or an assembly reference?)”

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerWindow.cs(10,41): error CS0246: The type or namespace name ‘EditorWindow’ could not be found (are you missing a using directive or an assembly reference?)

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerWindow.cs(41,4): error CS0246: The type or namespace name ‘MenuItemAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerWindow.cs(41,4): error CS0246: The type or namespace name ‘MenuItem’ could not be found (are you missing a using directive or an assembly reference?)

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerWindow.cs(53,10): error CS0246: The type or namespace name ‘MenuItemAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerWindow.cs(53,10): error CS0246: The type or namespace name ‘MenuItem’ could not be found (are you missing a using directive or an assembly reference?)

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerPopup.cs(12,43): error CS0246: The type or namespace name ‘EditorWindow’ could not be found (are you missing a using directive or an assembly reference?)

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerPopup.cs(81,10): error CS0246: The type or namespace name ‘MenuItemAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Assets\BasicMeshCombiner\Editor\BasicMeshCombinerPopup.cs(81,10): error CS0246: The type or namespace name ‘MenuItem’ could not be found (are you missing a using directive or an assembly reference?)

Error building Player because scripts had compiler errors

I’ve thoroughly checked the setup and can’t seem to identify the root cause. These errors seem to suggest missing references or using directives, particularly for classes like EditorWindow and MenuItem. This issue has arisen recently; previously, the build process worked seamlessly.

I would greatly appreciate any insights or suggestions from the community on resolving these errors. Your expertise and guidance would be invaluable in getting the asset back on track. Thank you in advance for your assistance!

Best regards,

You seem to be including editor-only types in the build.

If you have an Assembly Definition file under BasicMeshCombiner you need to have another one under BasicMeshCombiner/Editor which is set to be compiled only for the Editor platform (deselect all platforms, then select editor platform). The “Editor” special folder name does not apply when there’s an Assembly Definition in a parent folder.

2 Likes