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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Bug Editor no longer opening after crash

Discussion in 'Editor & General Support' started by TAJ4K, Oct 11, 2023.

  1. TAJ4K

    TAJ4K

    Joined:
    Jun 5, 2023
    Posts:
    2
    Hey all,

    I just tried compiling my VR game to android (for oculus quest) after adjusting some graphics settings to make it run a bit smoother. During compilation it got stuck hard on "preparing shader variants", not moving off that stage after 3+ hours. Everything else about the editor froze as well, so I naively decided to force quit and try to compile without the graphics changes.

    When attempting to reopen, Unity hub just shows the spinning icon for about a minute, and the unity editor appears in my taskbar, but doesn't actually open. I've restarted just about everything and it's still stuck like this. I'm using 2022.3.8f1 with URP if that means anything. I don't think I lost the project because all the files seem to still be there, but I really need this to reopen soon...

    Update: Speak of the devil, after sitting there for ~20 minutes it just randomly opens. Still a weird bug though.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,797
    Oh my goodness, nobody should have to live in that kind of fear... It is 2023!!

    PROPERLY CONFIGURING AND USING ENTERPRISE SOURCE CONTROL

    I'm sorry you've had this issue. Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

    Here is how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally the ONLY folders you should ever source control are:

    Assets/
    ProjectSettings/
    Packages/

    NEVER source control Library/ or Temp/ or Logs/
    NEVER source control anything from Visual Studio (.vs, .csproj, none of that noise)

    Setting git up with Unity (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

    If you plan on joining the software industry, you will be required and expected to know how to use source control.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
     
  3. TAJ4K

    TAJ4K

    Joined:
    Jun 5, 2023
    Posts:
    2
    Yeah I know, this is just a small research that I have some backups for already, I use git all the time haha. I was more concerned with the editor becoming broken, as I didn't really change anything that would have caused the files to become corrupt/lost.
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,106
    What's in the Editor.log?
    Try deleting the Library folder.