Search Unity

EditorApplication.PlayModeStateChanged crash

Discussion in 'Editor & General Support' started by VascoCorreia, Jan 5, 2021.

  1. VascoCorreia

    VascoCorreia

    Joined:
    Dec 5, 2020
    Posts:
    23
    I can't seem to find help regarding this issue.
    I have already reinstalled unity. I am using Visual Studio Code and Unity version 2020.1.12f1.

    50% of the time I click the play button I get this window that says EditorApplication.PlayModeStateChanged window and it never leaves. The only way to quit is to go to the task manager and kill the process.

    I have attached a photo of the crash.

    Does anyone have any idea what might be causing this?
    Thank you in advance!
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    Might be some code (your or a plugin) that is hooking this callback and crashing.

    Does it happen if you make a brand-new project and press play?
     
    VascoCorreia likes this.
  3. VascoCorreia

    VascoCorreia

    Joined:
    Dec 5, 2020
    Posts:
    23
    I downloaded a sample project and it seemed to work fine, no crashes.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    Assuming your project is fully under source control, I'd just start deleting third party crap that might be hooking this callback until things stop misbehaving. Or you can go searching for code that attaches to those callbacks and disable it, if it is not in DLL form.
     
    VascoCorreia likes this.
  5. VascoCorreia

    VascoCorreia

    Joined:
    Dec 5, 2020
    Posts:
    23
    It is under source control. Any good tips on how to look for this callback?
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    Bust out your delete key and start destroying things such as what is in your Editor folders!!

    Since 100% of any project I touch is in source control (first thing I do), that's always the best way to rapidly get broad-scale intel about what's going on... DELETE!
     
    VascoCorreia likes this.