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.

Unity UI How do I access UnityEngine.UI in script in Unity 2019.2?

Discussion in 'UGUI & TextMesh Pro' started by ysleungrockman, Aug 20, 2019.

  1. ysleungrockman

    ysleungrockman

    Joined:
    Mar 16, 2014
    Posts:
    31
    I knew that in Unity 2019.2, the UnityEngine.UI was replaced by UnityEngine.UIElements and it was moved to the Packages, which resulted in that I could not access it in script anymore. However, one of the plugins I am using is a Soft Mask plugin that extends the Mask class in UnityEngine.UI. It is now completely broken. I tried to fix it with UIElements, but I didn't find anything that is related to Mask. Therefore, I want to ask how I can access the UnityEngine.UI from the Packages? It's inside the Packages so maybe there is a way to access it in script, right?
     
  2. ysleungrockman

    ysleungrockman

    Joined:
    Mar 16, 2014
    Posts:
    31
    I think I found the reason. It's because the com.unity.ugui folder inside the Packages folder in the Unity project folder does not have any scripts, which the Visual Studio cannot find them so it cannot get the references. I don't know why this happened though...