- Home /
[4.6] Visual Studio Tools and UnityEngine.UI reference
I've tried using new classes from 4.6 in VS2013 but it doesn't see UnityEngine.UI namespace whatsoever. I've been reimporting VST package, rebuilding project files, restarting Unity and reference always ends up with yellow exclamation mark (pic related)
"using UnityEngine.UI" ends up throwing syntax error
Are you using the UnityVS that $$anonymous$$icrosoft released? Now called Visual Studio Tools for Unity
http://visualstudiogallery.msdn.microsoft.com/20b80b8c-659b-45ef-96c1-437828fe7cf2
yes, UnityVS was renamed to "Visual Studio Tools" by $$anonymous$$icrosoft
Answer by Enigme · Sep 11, 2014 at 03:43 AM
From the comment section in the VS2012 Tools for Unity:
Hello!
I'm using the VSTU with the new Unity 4.6 beta. There are now a new DLL to be deployed to UnityAssemblies folder: UnityEngine.UI.Dll. Without it, there will be a reference error in the generated VS project.
I was able to fix this manually (getting the missing dll from [Unity install folder]\Editor\Data\UnityExtensions\Unity\GUISystem\4.6.0\Standalone) and copying it to ([Unity project folder]\Library\UnityAssemblies) but it will be awesome if you could release an updated version of this extension.
Thanks! Frederico Zveiter
Source: http://visualstudiogallery.msdn.microsoft.com/7ab11d2a-f413-4ed6-b3de-ff1d05157714
This didn't seem to do the trick for me. Anyone have any luck?
Totally worked for me. Thanks!
VS Unity Tools version 1.9 says they have fixed this, but I have 1.9 installed and it doesn't work. I was previously adding the reference path every time the project refreshed, but just copying the file fixed it for this project permanently.
Answer by PFC-Ben-W · Oct 19, 2021 at 07:44 AM
If it didn't solve your problem, you need to activate a reference called "UnityEngine.UI.Player" under the Project Assembly. That did the trick for me.
Your answer
Follow this Question
Related Questions
Reliable way to get width/height of UI element? 3 Answers
How can I calculate whether an UI element is inside my camera view? 0 Answers
Is there a way to move a UI mask without moving child content? 3 Answers
Create UI elements dynamically on Unity 4.6 2 Answers
Unity 4.6 InputFields need help 1 Answer