Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
1
Question by hourglass · Mar 17, 2013 at 02:31 PM · bugunityeditormonodevelopnamespace

"Classic" namespace "UnityEditor" error

Very beginner here. All I have in mind is to make a little sprite move. I know Java pretty well, though I'm pretty new to JavaScript

So I made this code, which I think is correct.

pragma strict

var healh : int = 100;

var speed : int = 5;

function Start () {

}

function Update () {

 if(Input.GetAxis("Horizontal")){
     Transform.Translate(Vector3(Input.GetAxis("Horizontal") * speed * Time.deltaTime, 0, 0));
 }

}

But whenever I try to debug it, I always get the "Namespace 'UnityEditor' not found, maybe you forgot to add an assembly reference?" message. Like any sane person, I asked google what I should do. After a good deal of searching, I didn't find any answers.

From what I gathered, a bug in the Mono editor caused this, but that was nearly 2 years ago. It can't possibly be still around.

Anyhow, any and all help is appreciated.

Comment
Add comment · Show 2
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 SarperS · Mar 17, 2013 at 02:34 PM 1
Share

Are you trying to build a debug build from within mono developer?

avatar image hourglass · Mar 17, 2013 at 02:44 PM 0
Share

I believe I am.

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by GuyTidhar · Mar 17, 2013 at 02:33 PM

Try adding

 import UnityEditor;

Right after

 #pragma strict

Although it should be added by default.

Are you sure this script is the reason for this error?

Comment
Add comment · Show 4 · 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 hourglass · Mar 17, 2013 at 02:44 PM 0
Share

I tried that, and now I have 2 errors.

I'm just running the debugging process, trying to get this error free.

avatar image GuyTidhar · Mar 17, 2013 at 02:47 PM 0
Share

As Sarper Soher suggested - you shouldn't build the debug build from within mono developer.

It is not relevant for work with unity.

If you wish to debug, once you regularly run the game, you need to attach the debugger to your running instance.

Look for:

"Run -> Attach to process"

Then select the unity editor.

avatar image hourglass · Mar 17, 2013 at 02:48 PM 0
Share

Alright, what should I do ins$$anonymous$$d to make sure my code is syntactically correct?

avatar image GuyTidhar · Mar 17, 2013 at 02:53 PM 0
Share

You need to check the unity console:

CTRL + SHIFT + C, if it is not opened.

There you get all warnings, errors (wrong syntax and exceptions), and debug logs.

You can focus away from the editor and back in order to refresh and make unity compile your latest changes.

(notice the right bottom processing icon that animates when unity compiles your changes).

Also, double clicking the specific error lines you get in the console, should pop the code editor on the corresponding line at which the error or log are happening.

avatar image
0

Answer by Ben Blaut · Mar 20, 2013 at 07:55 PM

It seems the method for debugging using MonoDevelop has changed with the latest upgrade to 4.1. Before, you could build and run from Mono to debug with breakpoints, but it appears you no longer can do this using the simple "Build" and "Debug" buttons in Mono.

To do so now, you have to use "Attach to Process" on the toolbar or in the "Run" menu, and attach it to the Unity Editor. Now, when you hit play in the Editor, it will bring you to Mono so you can step through from your breakpoint.

Comment
Add comment · Show 1 · 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 whydoidoit · Mar 20, 2013 at 08:43 PM 0
Share

See the Unity Gems article on debugging with $$anonymous$$onoDevelop

avatar image
0

Answer by wert · May 15, 2013 at 12:24 PM

change Api Compatability Level to .NET 2.0 (not Subset)

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
avatar image
0

Answer by mateiasu · Jun 23, 2013 at 03:44 AM

Hi together!

I also had similar problems and found the solution with this post http://answers.unity3d.com/questions/419565/unity-41-javascript-compile-unityeditor-not-found.html?sort=oldest.

I provide a small binary (Windows) which watches and fixes related project files.

https://bitbucket.org/mviranyi/unity-patches/downloads

Hope it helps :)

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

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.

Follow this Question

Answers Answers and Comments

16 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

Related Questions

Issue with navmesh and object graphics 0 Answers

Mono "Go to declaration" missing 2 Answers

Scripts in StreamingAssets folder not opening with MonoDevelop?! 2 Answers

Why I am not able to see monodevelope.app in macOS 0 Answers

Unity 5 project freeze after switching to WebGL 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