- Home /
Unity Editor Error CS0234: Build doesn't exist in the namespae "UnityEditor"
Hi, i am new to unity. Just tried building my first game, and just got stuck after using the standard asset in my scene. The error is readable in the screen shot, as it says
"The type or namespace name Build' does not exist in the namespace
UnityEditor'. Are you missing an assembly reference?"
the code that is showing the error is as under;-
using System;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
namespace UnityStandardAssets.CrossPlatformInput
{
[ExecuteInEditMode]
public class MobileControlRig : MonoBehaviour
#if UNITY_EDITOR
, UnityEditor.Build.IActiveBuildTargetChanged
#endif
{
// this script enables or disables the child objects of a control rig
// depending on whether the USE_MOBILE_INPUT define is declared.
After searching the internet and unity forum for the past three days, i am now posting this question, as all available solutions didn't worked for me at all.
guidance required from you experts out there.
UNITY SCREEN SHOT
CODE SCREENSHOT
Answer by Oiluj · Dec 21, 2018 at 08:54 AM
The error may be due to the fact that you have not imported some of the "Standard Assets" folders, or you have deleted them or moved them from the right place unintentionally. Try importing the folders: CrossPlatformInput, Editor and Utility.
Look at this answer:
https://answers.unity.com/questions/755466/the-name-crossplatforminput-does-not-exist-in-the.html
Answer by theLittleSettler · Oct 31, 2017 at 07:25 PM
You probably don't have a unity version with that interface. See here, https://docs.unity3d.com/ScriptReference/Build.IActiveBuildTargetChanged.html
It appears to have been added in 2017.1 (see "other versions" - although it might not have been documented, and have been added earlier... that's unlikely).
Odd, so it appears you're using a part of standard assets that was meant for a later version of unity. You should be able to download the older standard assets, but I'm not sure if there is any way to download them outside of the unity installer (or, well, just remove the interface and the methods it has from the script if you don't need it).
Answer by Toadill9114 · Aug 03, 2018 at 05:40 AM
@AadilPk I know this thread is over a year old and you probably figured this out by now but I figured others having the same problem may run into this as well. So..... I actually got an error very similar to this when trying to build for Android except mine said 'Connect' does not exist......ect I found out the problem was that I had enabled the Xiaomi Mi Game Center in the build settings. Doing this forces you to set up the connection to the game center ect. After I removed the game center the errors went away and I ran into some new problems, which had to do with running JDK10. The solution to this problems was to down grade to JDK8. Another note: I also had to down grade the Android SDK Tools in order to get my game to connect to my phone. You will want to navigate to your android SDK folder and delete the tools folder. Then download the older tools folder here. When done extract the tools folder replacing the tools folder that was there. I hope this information helps.
It worked! I've ran into this problem a few weeks ago and couldn't find the solution and stopped working on it for a while. You've rejuvenated my enthusiasm towards completing my android app.
Answer by _creatio_ · Sep 21, 2021 at 12:19 PM
I've got the issue with similar error messages. For me it appeared, when I tried to build the addressables (asset bundles). The errors were appearing in the editor scripts of a third party package.
I ended up by adding an assembly definition file to the folder with scripts of the package, with the reference to the scriptable pipeline assemblies. That fixed the issue for me.
Used Unity 2020.3.18f1
Answer by jsr2k1 · Sep 24, 2021 at 09:22 AM
Same error here. The problem was when I changed from 2020.3.14 to 2020.3.18
You just have to create again VS project files
Assets > Open C# Project
Problem fixed!
Your answer
Follow this Question
Related Questions
DIY Cave Environment Are you missing a using directive or an assembly reference? 1 Answer
unloading broken assembly unityeditor.wsa.extension.dll 1 Answer
Why is everything missing a 'direction or assembly reference'?! 0 Answers
Do you have to set a object reference for every script? 0 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers