Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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

    polynatic

    Joined:
    Feb 1, 2020
    Posts:
    3
    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?

    error.png
     
    JakeUpfront likes this.
  2. Mr-Frost

    Mr-Frost

    Joined:
    Oct 10, 2014
    Posts:
    6
    polynatic likes this.