I get this error and I don't understand why:
ArgumentException: The Assembly UnityEditor is referenced by Assembly-CSharp ('Library/ScriptAssemblies/Assembly-CSharp.dll'). But the dll is not allowed to be included or could not be found.
I know that it means that the Assembly-CSharp.dll has some code that linking it to Editor dll, but the code that is generating this issue is this one (not an editor script):
#if UNITY_EDITOR
// If we're in the editor, create the game object with hide flags set right away
GameObject go = UnityEditor.EditorUtility.CreateGameObjectWithHideFlags(name,
#if SHOW_HIDDEN_OBJECTS
HideFlags.DontSave | HideFlags.NotEditable, typeof(UIDrawCall));
#else
HideFlags.HideAndDontSave, typeof(UIDrawCall));
#endif
UIDrawCall dc = go.GetComponent();
#else
GameObject go = new GameObject(name);
DontDestroyOnLoad(go);
UIDrawCall dc = go.AddComponent();
#endif
Considering that the code is handled with #if UNITY_EDITOR, i don't see the reason why i get that error (i made the basic test #if UNITY_EDITOR1 and the build error disappeared)
This issue happens onUnity 5.5.0f3 , on a project upgraded from Unity 5.3
Any ideas how i can fix this?
↧