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

Question Missing UnityEngine.UI

Discussion in 'Scripting' started by Digital_Seven, Sep 10, 2020.

  1. Digital_Seven

    Digital_Seven

    Joined:
    Aug 20, 2015
    Posts:
    15
    I've done some Googling and there is no real support that I've found that doesn't result in wasted time every day.

    So every time I open Unity and Rider I have errors that UnityEngine doesn't have a UI package. so I get errors on the "using UnityEngine.UI;" line.

    From my googling, and experience with this issue, it's resolved when you Reimport everything. I guess is fine, but the project isn't small and this means I need an additional 30 minutes every morning to open unity and reimport everything.

    Does anyone else have an idea on what I can do to prevent this from being a daily issue?

    Turns out this might be an IDE only issue. I can run the game and the classes with errors in them still function normally...
     
    Last edited: Sep 10, 2020
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    Weird... might be some intellisense error or other.

    Also, I believe UnityEngine.UI will soon be (or may already be) moving to be a Unity package instead of part of the main engine. It could be that during this transition there are two compiled versions that your IDE is finding.

    One thing to try is deleting the .csproj and .sln files for your project and having Unity recreate them with Assets -> Open C# Project. Another thing to try is just reimport all. Another thing is to blow away your package cache (google for details) and then reconnect all the packages you want.