Search Unity

Stuck on Importing when opening the project for the first time after a reboot

Discussion in 'Editor & General Support' started by BoraMakar, Jul 19, 2021.

  1. BoraMakar

    BoraMakar

    Joined:
    Oct 18, 2020
    Posts:
    4
    This may be too specific, and related to OS issues even but I wanted to at least figure out how to approach the issue and how to solve it if possible.

    I don't have much to describe, when opening a project for the first time after a reboot, the project gets stuck presumably forever until I kill the process and reopen the project. The project opens up just fine on the second attempt without a significant import time.

    However, as it can be seen below, the first attempt will get stuck like this forever. There are no major negative impacts except for the fact that I have to remember this is a thing and kill the process after it gets stuck in this state, and reopen the project. I don't know if there are any other issues that do or might exist due to this but I haven't encountered anything I thought would be related.
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,749
    The go-to method for this has always been to:

    - close Unity
    - delete the
    Library/
    folder within your project (not the shared OS one on MacOS!!)
    - reopen Unity and let it reimport all

    This folder contains imported data and should never be source controlled, and thus contains nothing useful that you can interact with asset-wise.

    Sometimes it is adequate to nuke only the
    Library/ScriptAssemblies
    .

    Not sure if you are already using source control, but that's useful for confidence in deleting stuff.

    If you're not, please consider using proper industrial-grade 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.).

    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

    Here's 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 the right .gitignore file:

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

    Generally setting Unity up (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.
     
  3. BoraMakar

    BoraMakar

    Joined:
    Oct 18, 2020
    Posts:
    4
    Hey, thanks for the detailed post and sorry for replying so late. I've known about the /Library folder possibly causing issues, I already use git on all of my projects that are worth anything but this problem I'm dealing with is slightly different.

    I know git causes issues with object IDs and some other stuff when doing pull/push operation while Unity is open so I didn't start a git repo to test the issue. All I did was import a couple assets I own using package manager and import a couple integration SDKs that are required for what I'm doing. At one point, which is not at a certain project size or related to a specific asset I've imported as far as I could tell because I even tried changing the orders and doing it one by one, sometimes the project just won't open and be stuck on the "Importing..." step for hours, 2 was the most I ever tried, and nothing will happen. But right after killing the process and opening the project, always using Unity Hub, it opens in under a minute without issues.
     
  4. jesse-small

    jesse-small

    Joined:
    Oct 28, 2014
    Posts:
    1
    Ever find a solution for this by chance? I also have this exact same problem, after re-boot if I open the project it'll get stuck but if I immediately kill the process and re-open it, it opens in under 10 seconds. Super weird!