Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Cant attach any scripts to game objects.

Discussion in 'Scripting' started by pixelfixation, Jul 9, 2014.

  1. pixelfixation

    pixelfixation

    Joined:
    Feb 7, 2014
    Posts:
    29
    I am having an issue where all of the sudden i cannot attach any of my scripts to game objects the error says that the class doesn't exist and to check to make sure the script name and class name match. i have copy and pasted the name of the script into the class name of each script and i cannot attach them. this happened just after i made a bunch of subfolders in my scripts file for different kinds of scripts. i got rid of all the folders and returned it to how it was and i am still unable to attach them.

    even if i make a new script i cannot add that as a component to anything either it has the same result.
     
    Last edited: Jul 9, 2014
  2. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    Do you have any compiler errors? Please check what the Console says.
     
    pixelfixation likes this.
  3. pixelfixation

    pixelfixation

    Joined:
    Feb 7, 2014
    Posts:
    29
    Oh wow! If you have an error on one of your scripts you cant attach any others? i had no idea. Thanks man.
     
  4. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    Yeah, that's how it works!