No access to the "Text" keyword when using UnityEngine.ui namespace

Hi there, I’ve been following along with the course just fine up until this point but I seem to have hit a bug or other roadblock.

In Visual Studio (2019), after entering “using UnityEngine.UI”, I tried to type out “Text” just as Ben does, but when I type it out it does not turn teal (it stays white), which I believe means that it isn’t calling the “Text” from the UnityEngine.UI namespace.

I’ve confirmed that it is not working properly by finishing the line of code as it’s typed in the video and checking to see if I have the same functionality that Ben has in my Unity project.

Perhaps this is just the result of having a newer version? I’ve been using Unity v2019.3.0f6.

Any help would be appreciated, and I’d be happy to provide screenshots if needed.

Hi Robert,

Welcome to our forum! :slight_smile:

Does “Text” just stay white or does the compiler complain? If the compiler does not complain, I would suggest to watch lecture “Fixing Visual Studio Problems” (currently #4).

According to the API, the Text class is still included in the UnityEngine.UI namespace in your version of Unity.

Hi Nina,

I went through the troubleshooting steps in Lecture #4 based on your recommendation, and that has fixed the issue. Thank you! :grinning:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms