- Home /
Error CS0234: The type or namespace name `IActiveBuildTargetChanged' does not exist in the namespace `UnityEditor.Build'. Even after moving Editor folder.
Hi,
I was searching for this error and I found this answer but it is not working. I moved Editor folder from StandardAssets/CrossPlatformInput/Scripts to StandardAssets folder and it is still throwing this error. I tried to put this folder in every single other folder but it is still not working. Should I put ALL scrips in Editor folder?
I'm using Unity 5.6.2 on WIndows, and I imported whole CrossPlatformInput package and also couple of other standard packages.
Answer by GafferSystems · Oct 08, 2017 at 01:22 PM
I'm having the same issues. One guy apparently found a temp fix, I would comment out instead of deleting the lines though: http://answers.unity3d.com/questions/1396260/error-cs0234-the-type-or-namespace-name-iactivebui-1.html
Answer by Oiluj · Dec 21, 2018 at 08:51 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 oriolmanya · Apr 12, 2020 at 03:02 PM
In my case it was because I created "Asset Assembly Definition" for Asset Store stuff, to check if the project recompiled faster (I was not succesful... :<). If you have done so, go to every "Assembly Definition" file and check the checkbox: "No Engine References" on top of inspector section "General".
It worked for me and by now I manged to get it working on Android device.
Answer by lavos2300 · Jan 04 at 11:26 AM
Make sure all your related code (including the IActiveBuildTargetChanged reference) is inside a UNITY_EDITOR directive :
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Build;
public class YourClass : IActiveBuildTargetChanged
{
//Your code
}
#endif
Your answer
Follow this Question
Related Questions
The type or namespace name `UnityEditor' could not be found 1 Answer
I can only select a prefab as my GameObject in the editor. 1 Answer
Platform dependent flags required in Using/Namespace definition? 1 Answer
How can i make both two cameras to follow the player but only one with control on player ? 0 Answers