Search Unity

Scripts suddenly stopped working!

Discussion in 'Editor & General Support' started by unity_Y1lIvcxoPDGJpw, Jan 9, 2020.

  1. unity_Y1lIvcxoPDGJpw

    unity_Y1lIvcxoPDGJpw

    Joined:
    Jan 9, 2020
    Posts:
    2
    Hey,

    while i was on my project, all the scripts attached to any gameobject worked properly until, without any change made, all showed this error: "The associated script cannot be loaded, please fix any compile errors and assign a valid script"

    while i tried to reattach them ive got the error: "Can't add script component 'Skeleton' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match." (the script name and the class name are identical)


    what should i do?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you add a new script?
     
  3. rahimaga

    rahimaga

    Joined:
    Mar 25, 2019
    Posts:
    8
    once was happened to me te same, the problem was the heritage.
    The scripts were unconfigured and did not inherit from monobehaviour, check it.
     
  4. unity_Y1lIvcxoPDGJpw

    unity_Y1lIvcxoPDGJpw

    Joined:
    Jan 9, 2020
    Posts:
    2
    no i can't.

    thats exactly the error but all the scripts that i have starting like this :

    Code (CSharp):
    1. public class Player : MonoBehaviour
    2. {
    3. ...
    4. }
     
  5. unity_DyiImhfn4IWPPA

    unity_DyiImhfn4IWPPA

    Joined:
    Jun 22, 2019
    Posts:
    1
    I have the exact same Problem after Updating to 2019.3