Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug [2022.1.2f1] UnityEditor.dll assembly is referenced by user code, but this is not allowed.

Discussion in 'Editor & General Support' started by polynatic, May 27, 2022.

  1. polynatic


    Feb 1, 2020
    I tried to upgrade a project from 2021.3.3f1 to 2022.1.2f1 and when trying to build (for Android and iOS) I get this error. The project worked fine on 2020 and 2021. It does not tell me where this reference is coming from and there is no further information given. Adding using UnityEditor anywhere in non editor code correctly shows an error that this is not possible with the location in the code, but not for this error. I tried a fresh import of the project on a Mac and Windows machine and it did not help. I also deleted all custom written code that references UnityEditor and the error keeps persisting. Does anybody have an idea on how I could find out more about where this reference is coming from and how I can remove it?

  2. Mr-Frost


    Oct 10, 2014
    polynatic likes this.