Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

General problem with scripts: The associated script cannot be loaded

Discussion in 'Editor & General Support' started by Zape, Jun 12, 2013.

  1. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,834
    I only started using started using scriptable Objects, and I am sporadically getting this error, it will sometimes break after a recompile sometimes get fixed, it happens so often that it makes it unusable I guess dont use it.
     
  2. SuperCrow2

    SuperCrow2

    Joined:
    Mar 8, 2018
    Posts:
    466
    Did anyone else have this problem? Once I backed up my game onto C-Drive from my flash drives, only the score on the C-Drive no longer works on certain levels, but works on other levels. The score works on all levels on my flash drives. The weird thing is, every other script works perfectly fine on each level on C-Drive, except the score on certain levels.

    Anyone know what could be the problem? The score always works on my flash drives as long as I never back up the flash drives from C-Drive.

    I tried so many different things but never got it working again. Even made a new scene and still didnt work
     
  3. aguiarbrunoa

    aguiarbrunoa

    Joined:
    Jun 11, 2020
    Posts:
    1
    This also happened to me and I FOUND THE SOLUTION!!!!!
    The problem was that some scripts were obsolete and so I had to open them and a box appeared to say to "renew" them and then I did that and in the unity project there was a box that I think said to make all scripts compatible, or something like that, I clicked on that and after a while it's already solved.
    The only down side is that I had to open all the scripts to find what was obsolete.
    Another thing that may be causing this problem is the "scripts" of the shaders that can also be obsolete.
     
  4. Zasox

    Zasox

    Joined:
    Nov 28, 2013
    Posts:
    1
    just enable for red error and delete problem source
     
  5. Racine-Z

    Racine-Z

    Joined:
    Dec 10, 2015
    Posts:
    4
    THANK YOU, i disabled the red error tab and dont see that there is a erro but now it's all right
     
  6. Firdavsbe

    Firdavsbe

    Joined:
    Jul 12, 2020
    Posts:
    1
    Man You helped me
     
  7. cheesline

    cheesline

    Joined:
    Jul 22, 2020
    Posts:
    2
    i have the same problem I wanted to ad a script to move my figure in my 2D game but it happened nothing and the console said there is something wrong but i checked everything
     
  8. cheesline

    cheesline

    Joined:
    Jul 22, 2020
    Posts:
    2
    my script doesn’t work in my 2D Projekt (I want to control the figure): using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour{ public CharacterController2D controller; public float runSpeed = 40f; float horizentalMove = 0f; void Update(){ horizontalMove = Input.GetAXisRaw("Horizontal") * runSpeed; } void FixedUpdata(){ controller.Move(horizontalMove * Time.fixedDeltaTime, false, false); } }
     
  9. CGCowboy

    CGCowboy

    Joined:
    Mar 7, 2018
    Posts:
    11
    This is what worked for me...

    I had hundreds of scripts that ALL had this error so I thought it was project-wide.

    Turns out: During refactoring on one script, I removed a public variable which was fine for that script (compiled successfully). However, I forgot about another script (GameManager) that was referencing that variable.

    For whatever reason, this made entire project fubar. Every script in my project had this error. But, when I removed the line that was referencing the public variable no longer there, everything was in order again. Took me forever to triage this.
     
  10. Freakhealer

    Freakhealer

    Joined:
    Aug 27, 2020
    Posts:
    1
    ALL HAIL ROGUE12
     
  11. Ferum1989

    Ferum1989

    Joined:
    Nov 3, 2013
    Posts:
    15
    I had this problem today. I just edited some script, changed some variable, saved it. I opened Unity and saw that all shaders in the project were broken! In a panic, I reloaded the project, Unity started recompiling a scripts, and when everything was over, absolutely all scripts showed the "Missing" status.

    This method saved me: I deleted all metafiles from the Assets folder and restarted the project. Unity recompiling everything again and everything is working fine!

    Unity 2019.1.11f1
     
unityunity