Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Multiple .asset files -> "The Associated Script Can Not Be Loaded", any help?

Discussion in '2020.2 Beta' started by Jamez0r, Nov 3, 2020.

  1. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    206
    I'm not 100% sure what is going on, but my project suddenly seems to be having issues with .asset files loading.

    I'm using URP, and my Project Settings -> Graphics is configured to use the URP Pipeline Asset. Every time I open Unity now, the pipeline asset is removed from the Project Settings. When I select the Pipeline Asset, it says "The associated script can not be loaded...."



    I've tried creating a new Pipeline Asset and assigning it - still the same problem, when I restart the project it is no longer applied in Project Settings.

    While I was typing this up, the URP Pipeline asset (in screenshot above) finally 'loaded'. I didn't do anything to cause it to load. What the heck could be going on?

    This same behavior (.asset file not loading initially, and then randomly loading after a couple minutes) is happening with another settings file too. I didn't change any sort of settings in my project that would affect this sort of thing. Any ideas?

    Thanks for any help!

    Note: I'm using 2020.2.0b8

    Note 2: Doing "Reimport" on the Pipeline Asset does nothing. Doing "Reimport" on the entire URP folder under the Packages section DOES fix the issue, and even makes the Pipeline Asset appear back in the Project Settings -> Graphics. But when I close and reopen the project, it goes away again :mad:

    Note 3: I also tried deleting my GraphicsSettings.asset and letting Unity recreate it, just in case that was contributing to the issue. Didn't fix it. Definitely seems to be something related to the scripts loading when the project starts up
     
    Last edited: Nov 3, 2020
  2. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Did you fix any compile errors?
     
  3. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    206
    I don't have any compile errors
     
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @Jamez0r,

    There's a range of potential causes for these issues:

    1. Apostrophes in the file path
    2. Script editor issue (VS, Rider)
    3. Compilation errors that for some reason do not appear
    4. Capitalization in the file names

    If you're still affected by this, it would be great if you could submit a bug report with a reproducible attached so we can investigate it.
     
  5. Jamez0r

    Jamez0r

    Joined:
    Jul 29, 2019
    Posts:
    206
    Hey @LeonhardP , I did eventually find out what was the cause of this issue - two months ago there was a post on the Spine (animation software) forum talking about other people having the same issue, and they figured it out and updated the Spine runtime and it did indeed fix the issue for me: http://esotericsoftware.com/forum/Unity-2020-2f1-15128?p=66955#p66955

    What is worrisome to me is that any 3rd party asset could cause this issue, and that (at least in my case) it isn't clear what is causing it. AKA on my end, I would just start up my project and the URP Pipeline Asset simply wasn't applied to the project. Luckily I found the thread on the Spine forums, and updating Spine fixed it, but it would be nice if there was an easy way to find the cause of the issue so that it can be addressed.
     
    LeonhardP likes this.