• 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 /
avatar image
0
Question by adriandevera · Jun 28, 2015 at 09:07 AM · unity 5errorreferencenamespacetype

The type or namespace name `GridSelection' could not be found. Are you missing a using directive or an assembly reference?

Ive looked online for this error and people have stated several things such as moving your scripts to a folder in your root called "Editor". Ive done that and now several more of my scripts just broke and its beginning to irritate me because either its a Unity Editor namespace error (for building and test which is not my case) or its a suggestion like move it to a folder which originally ive had it in a folder named "scripts". Ever since the move to an "Editor" folder its just showing this error everywhere...

 The type or namespace name `GridSelection' could not be found. Are you missing a using directive or an assembly reference?
 The type or namespace name `charinfo' could not be found. Are you missing a using directive or an assembly reference?
 The type or namespace name `terraingen' could not be found. Are you missing a using directive or an assembly reference?
 The type or namespace name `settings' could not be found. Are you missing a using directive or an assembly reference?
 The type or namespace name `playerinfo' could not be found. Are you missing a using directive or an assembly reference?
 The type or namespace name `mousecontrols' could not be found. Are you missing a using directive or an assembly reference?
 The type or namespace name `camcontrols' could not be found. Are you missing a using directive or an assembly reference?
Comment
Add comment
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 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Bunny83 · Jun 28, 2015 at 09:12 AM

The editor folder is only for editor scripts. Runtime script must not be placed in a folder called "editor". Things like "mousecontol" and "camcontrol" most likely are not editor script. The others probably as well. So move them out of the editor folder.

Editor scripts are scripts that extend the editors functionality and aren't directly related to your game / application.

Comment
Add comment · Show 3 · 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
avatar image adriandevera · Jun 28, 2015 at 09:38 AM 0
Share

Okay now that makes a lot more sense. So that worked but the first error remains.

avatar image Bunny83 · Jun 28, 2015 at 10:50 PM 0
Share

Well, are you sure that you have a class called "GridSelection" somewhere in your project? The compiler simply tells you that at some point in your project you try to access a class called "GridSelection" but the compiler can't find any class with that name.

Sorry, but we can't help you any further since "GridSelection" isn't a standard class and we know nothing about your project. We don't even have the code that throws the error.

avatar image adriandevera · Jun 29, 2015 at 08:20 AM 0
Share

Absolutely positive I have the class, the grid system was what I was working on lately. Im not sure if it was a bug because I copied the class itself other than the automatically generated headers, recreated one so unity generated a new one with the proper names and it still couldnt find it.

I had everything backed up on bitbucket but when I was about to just pull the file for it, it suddenly worked. Not sure what happened there but it just worked out now.

Thanks Benny!

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

22 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

Related Questions

Unity Recorder "the type or namespace could not be found" 1 Answer

The type or namespace name NetworkInformation does not exist in the namespace System.Net 1 Answer

the type or namespace cannot be found 0 Answers

The type or namespace name could not be found. Are you missing a using directive or an assembly reference? 4 Answers

How do I fix this Null Reference error and update my score? 2 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