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;
using UnityEditor;
using UnityEngine;

namespace UnityStandardAssets.CrossPlatformInput
    public class MobileControlRig : MonoBehaviour
        , UnityEditor.Build.IActiveBuildTargetChanged
        // 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.



Your files are probably not in an Editor folder.

You probably don’t have a unity version with that interface.
See here, Unity - Scripting API: IActiveBuildTargetChanged

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).

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.

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

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!

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: