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

Unity project broken.

Discussion in 'Editor & General Support' started by Epic-Username, Jul 28, 2017.

  1. Epic-Username

    Epic-Username

    Joined:
    May 24, 2015
    Posts:
    339
    I have a project i have been working on but now on every prefab and game object that had a script on i'm getting this warning: The associated script can not be loaded. Please fix any compile errors and assign a valid script.

    And when i try to play i'm getting this warning: all compile errors have to be fixed before you can enter playmode!

    and when i try to drag a script onto a object i get this warning: Please fix compile errors before creating new script components.

    So from what i can tell my project is broken how do i fix it? i tried restarting unity but that did nothing.
     
  2. Epic-Username

    Epic-Username

    Joined:
    May 24, 2015
    Posts:
    339
    Never mind i fixed the problem but next time i hope unity actually tells me whats wrong in the console...

    The problem was apparently i cant send a component through a Command call.
     
    Last edited: Jul 28, 2017
  3. guillermoi

    guillermoi

    Joined:
    Sep 20, 2012
    Posts:
    27
    Hey.

    Well if you open a project that has an error in the code Unity can't compile it and you start gettings these "The associated script can not be loaded.." . I'm guessing there was a compilation error message in the log (the component thing that you mention) which needed to be fixed before the whole thing got loaded properly.
     
  4. Epic-Username

    Epic-Username

    Joined:
    May 24, 2015
    Posts:
    339
    I don't understand how it expects me to fix a error if the console doesn't tell me whats wrong... i had to search through every line of code in my last script to find the error, luckily it was only a small script.

    That is why i made this post because the console didn't give me any errors even though a dialog box came up saying there's errors when i tried to play.
     
    Last edited: Jul 28, 2017