Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by DwarvenGiant · Jul 07, 2016 at 10:31 PM · scripting problemerrorerror messageplayplaymode

Whenever I try to enter playmode after creating a script, a compiler error pops up

I started working in Unity yesterday on a project I had in mind. I started by implementing the playable character's sprite with the help of my friend who has worked with Unity for quite some time now. Everything seemed to be fine, and after creating the character's movement script (and putting some code in it), I tried entering playmode, which gave me the following message, "All compiler errors have to be fixed before you can enter playmode!"

So my friend and I first tried checking the problem in the Console tab, which showed us that the root of the problem is somewhere in "Unity/Editor/Data/Mono/lib/mono/unity/smcs.exe", but we didn't manage to do much with this information, so we tried cleaning up the code instead, checking if there's anything wrong with it. Nothing, the code itself seems fine.

So this is when we realized I should probably just restart the project. So I did- I deleted what little I've done in the broken one and started over, now taking small steps and checking if playmode is working, every time I add/change something. I implemented the sprites asset, changed it from Singular to Multiple (In the Sprite Renderer), sliced it in two, put the one I needed in the scene, everything just as I did before- And everything is fine so far and I can still enter the playmode.

Now I got to the point where, last time, I created the script. I decided to not even bother giving it a proper name or adding any code to it, but this time, just creating the script.

Finally, the message I've been waiting for appeared, the same one from earlier (All compiler errors... blabla... playmode!).

Now, I tried looking the error up on the internet, searching for every possible solution, and very few people seemed to have the same problem I do & ask about it on the forums- Actually, now that I checked those threads again, it seems like non of them have the same problem as mine.

Anyways, the things I've tried so far are:

  • Restarting the computer

  • Uninstalling/reinstalling Unity

  • Manually reinstalling VisualStudio

  • Deleting the project and starting over

  • Upgrading to Windows 10 (But I also reverted back to 7- Did all of this because of a reoccurring VisualStudio installation error that I kept ignoring that mentioned Windows 10. This error doesn't happen anymore)

  • Putting down some seemingly legitimate code in the script

  • Checking if the code really is legitimate with the help of answers to similar problems on the forums (Most notably- void start in 4th line; class name and script name identical)

  • My friend and I even compared the code in each's newly-made scripts (Me and him have different computers), and it was identical (He hasn't bumped into any problems himself in Unity yet)


Other things to keep in mind:

  • I did try deleting any script I have, and when I do that, playmode actually works, but that's because there's simply no script to make an error

  • Adding any other component that isn't a script doesn't make any problems.

  • The "NewBehaviourScript" script component is attached to said sprite that I did manage to put in game. The sprite itself doesn't create any problems.


Thanks for reading and every little help or suggestion would be very appreciated. :)

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 Firedan1176 · Jul 08, 2016 at 01:59 AM 0
Share

What version of Unity do you have, and can you show the code? Is there no error showing up in the console? Send a screenshot of the console if you can.

avatar image DwarvenGiant Firedan1176 · Jul 08, 2016 at 02:41 AM 0
Share

The version is 5.3.5f1.

Here are pictures of the code and how the error is shown in the console:

alt text

alt text

unityscripterror.png (12.3 kB)
unityconsoleerror.png (56.6 kB)
avatar image Firedan1176 DwarvenGiant · Jul 08, 2016 at 03:28 AM 0
Share

Do you have Norton security, or any other antivirus installed? Some users report that Norton put $$anonymous$$ono.exe into a quarantine. Try removing it if you have Norton. If not, do you have any other antivirus that could be messing with it?

You can also try:

  1. In your project view, right click and select Reimport All Assets

  2. Completely uninstall Unity and remove any registry keys (I have heard Revo Uninstaller can do this, but you may want to research if it's safe)

  3. Disable antivirus for a moment

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

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

Related Questions

Create a copy of a non MonoBehaviour class and set variables from other class 0 Answers

error CS0120: An object reference is required to access non-static member `TextManagerLvl1.currentState' 1 Answer

C# Scripts Error 1 Answer

All compiler errors have to be fixed, but I copy pasted the code from the tutorial roll a ball to ensure its right. It still gives me the error! 0 Answers

"The associated script cannot be loaded" 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