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 /
This question was closed Jun 21, 2014 at 07:06 PM by AlucardJay for the following reason:

The question is answered in the comments

avatar image
0
Question by U N I T Y ThatsaUnity · Jun 07, 2014 at 10:25 AM · errorgame object

Error message, HELP!!!

"Can't add script : Can't add component 'PlayerController' because it doesn't exist. Check to see if the file name and class name match." This is the error i get when i try to apply a script to a game object, please help as i am an beginner! Thank you!

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 Bilelmnasser · Jun 07, 2014 at 11:49 AM 0
Share

can you explain a little bit more ?

avatar image Fornoreason1000 · Jun 07, 2014 at 12:52 PM 1
Share

I have an error... I do not know what it its nor should i tell you because i have an error... fix this error for me for it is an error and i need it fixed because i have an error. now fix it for me... now!?

you clearly have a lot to learn... in order for us to help you , you really do need to add some detail... such as what the error says.. what you are doing.. information the the script you are attaining(if you wrote the script.. code is usually very helpful to identify errors).

based purely off an assumption on reading your description it sounds like a class name and file name doesn't match or "playerController" script has been deleted from your assetes... check both

avatar image tanoshimi · Jun 07, 2014 at 12:58 PM 1
Share

And did you read the error message and did what it said? "Check to see if the file name and class name match"....?

avatar image Engine Number 9 · Jun 21, 2014 at 06:52 PM 0
Share

I had this same error. Thank you tanoshimi for an extremely clear and concise answer to an extremely clear and concise question.

1 Reply

  • Sort: 
avatar image
2
Best Answer

Answer by tanoshimi · Jun 08, 2014 at 03:46 PM

You look for the file name called PlayerController, and you see whether the class it contains is called PlayerController...

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 U N I T Y ThatsaUnity · Jun 08, 2014 at 03:42 PM 0
Share

When you say if i did what it said when it asks if i have checked to see if the file name and class name match" I can't do so because i wouldn't know where to look. And Fornoreason, when i ask my questions i don't simply demand a fix to it, i am just asking what the origin of the issue is and what causes it and what i need to look for.

avatar image U N I T Y ThatsaUnity · Jun 08, 2014 at 04:09 PM 0
Share

thank u very much!

avatar image RHD · Nov 21, 2014 at 03:30 PM 0
Share

Hi, Which is the class then in this script example because I can't figure out what to title it to get it to work. Thank you

using UnityEngine; using System.Collections; public class ExampleClass : $$anonymous$$onoBehaviour { public Transform other; void Update() { if (other) { Vector3 forward = transform.TransformDirection(Vector3.forward); Vector3 toOther = other.position - transform.position; if (Vector3.Dot(forward, toOther) < 0) print("The other transform is behind me!"); } } }

avatar image RHD · Nov 21, 2014 at 03:31 PM 0
Share

Ach! I DID enter the script in the 101010 box!

Follow this Question

Answers Answers and Comments

26 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

Related Questions

Tracking Down GUI Errors 0 Answers

Null Reference Exception Unless Scripted Object is Selected 1 Answer

2D toolkit scripting error - Very Basic Stuff 1 Answer

how to set Object reference to an instance of an object 1 Answer

Script Error!! 1 Answer


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