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
0
Question by Crat50 · Jul 22, 2014 at 10:13 PM · errorclassfiledoesnt

cant add script because it doesnt exist

I am trying to attach a piece of code to an object in my game and every time I do I get an error saying it doesn't exist and the class and file name don't match but it does. PLease help.alt text

screenshot (2).png (84.7 kB)
screenshot (3).png (92.8 kB)
Comment
Add comment · Show 3
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 rutter · Jul 22, 2014 at 10:14 PM 0
Share

At the very bottom of your screenshot, you'll notice there's a compiler error in your console. If you just created the Follow script, Unity doesn't recognize it yet because you haven't successfully compiled.

As for the error: it looks like you might be missing a semicolon, but compiler errors are famously difficult to interpret, so it's hard to say for sure without seeing the script.

avatar image Kyranio · Oct 03, 2014 at 08:36 AM 0
Share

I keep creating new scripts, but even new scripts will not attach to any objects. Even the just freshly created ones...

avatar image Sam_Wise_Gamgee · Jun 04, 2015 at 02:53 PM 0
Share

@Crat50 what did you do because I am having the same problem

2 Replies

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

Answer by Dracorat · Jul 22, 2014 at 10:14 PM

In MonoDevelop go to the Build Menu, clean the project and then build it again.

If it does not build due to some error, you will need to correct that error first.

In some cases, a restart of Unity 3D may be required.

Otherwise, after the build you should be able to attach the script.

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 Crat50 · Jul 22, 2014 at 11:46 PM 0
Share

I did what you said but I still cant add the script.

avatar image Crat50 · Jul 22, 2014 at 11:51 PM 0
Share

never$$anonymous$$d it works now thanks for the help.

avatar image 13dnizinski · Jul 22, 2014 at 11:53 PM 0
Share

That's what I've been doing. When that doesn't work, if you copy and paste the contents of the nonexistent script to a new one with the same name, it should work. That's what I had to do.

avatar image
0

Answer by keshavmix · Aug 01, 2015 at 04:02 PM

Make sure the name of the file and class name should be same.

I resolved this issue..

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

7 People are following this question.

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

Related Questions

Error BCE0018 0 Answers

what is the compile error on this script? 2 Answers

Unexcpected Token error with transform.find 2 Answers

WARNING : Assignment to temporary. 1 Answer

Access is denied in Windows 8 App 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