• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by kooshazarei · Dec 17, 2014 at 05:55 PM · androidexport

How to solve the error: "type or namespace UnityEngine.UI does not exist" in Windows

Hi,

We are trying to export our project for android and in the middle of compiling there is an error that says :

Assets/Scripts/GameController.cs(2,19): error CS0234: The type or namespace name UI' does not exist in the namespace UnityEngine'. Are you missing an assembly reference?

and when we comment this line, we can not use 'Text' type for new ui system.

what should we do now and what is the answer?

Thanks

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image taxvi · Dec 17, 2014 at 07:19 PM 0
Share

u sure you are exporting from unity 4.6?

avatar image kooshazarei · Dec 18, 2014 at 08:14 AM 0
Share

No, I am using Unity version 5 beta

avatar image desman · Nov 14, 2015 at 06:40 AM 0
Share

I started having this problem ever since upgrading to 5.2.2. When I hit F5 to debug in Visual Studio 2012, VS fails to compile the program (Unity compiles it fine). I had read that adding the "System.Web" reference to the project resolves that issue and indeed, when I was using Visual C# 2015, it did resolve it. But Visual C# 2015 crashes constantly and without warning, so I've gone back to 2012.

Except that VS 2012 won't let me add System.Web to my project and attempting to do so crashes Visual Studio 2012.

Dear Unity: what the hell is going on?

avatar image Siliko · Dec 07, 2020 at 09:29 PM 0
Share

For me what worked is Help -> Reset Packages to Default

16 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by ghanshalamayank · Mar 22 at 07:14 AM

This is due to one issue. UnityUI.dll is present in the location of Library/ScriptAssemblies(library of your project).

If you will open your Assembly-CSharp.csproj ,search

 <Reference Include="UnityEngine.UI">

if it is not present there add

For Mac Users

 <Reference Include="UnityEngine.UI">
 <HintPath>/Users/[Path to your current project]/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
 </Reference>

For Window Users

 <Reference Include="UnityEngine.UI">
 <HintPath>Library\ScriptAssemblies\UnityEngine.UI.dll</HintPath>
 </Reference>
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • ‹
  • 1
  • 2
  • 3
  • 4

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android Build Issue: Unable to convert classes into dex format 1 Answer

Export FBX Model Runtime 0 Answers

unity--android-resource.jar does not exist in project imported to Eclipse 1 Answer

Help,the bugs in the game are still there after export 0 Answers

Cannot build Google Development Project 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges