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. Dismiss Notice

Bug Subscene fails to close with error "header file couldn't be resolved"

Discussion in '2022.2 Beta' started by spinaljack, Oct 31, 2022.

  1. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    984
    some times the error says to use [RegisterGenericComponentType]

    restarting the editor and trying to close the subscene again a couple times allows the subscene to close correctly without any code changes.

    ideally it should work first time.
     
  2. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    984
    got it again with this error:
    Loading Entity Scene failed because the entity header file couldn't be resolved. This might be caused by a failed import of the entity scene. Please take a look at the SubScene MonoBehaviour that references this scene or at the asset import worker log

    There was no error logs in the folder
     
    Last edited: Nov 2, 2022
  3. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    984
    This time restarting didn't solve the issue.
    Instead I had to move some planes and spheres out of the sub scene and into the main scene and then the sub scene was able to close.
    After successfully closing the sub scene I could then move the planes and spheres back into the subscene and close it properly.

    Clearly something got borked in the saving process but unity should just resave the scene for you instead of giving unhelpful error messages.
     
  4. Selmar

    Selmar

    Joined:
    Sep 13, 2011
    Posts:
    55
    I get this error when a scene is saved in a sub-subfolder.

    For example, at `Scenes/My Sub Scene.unity` I can close the scene just fine. However, if my sub scene exists at `Scenes/SampleScene/My Sub Scene.unity, I get this error.
     
  5. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    The logs are in your project root folder under Logs/

    The files are named AssetImportWorker0.log AssetImportWorker1.log etc.

    However, when you first get an error, the initial error is what is important. "Loading Entity Scene failed because the entity header file couldn't be resolved." is past the real error, and as it states, the actual error will be written to your console in Unity, or in those log files.

    If you close the editor and re-open it, the logs are re-created. So you need to get the error, look at the actual error coming from the worker written to console, or look in the log file.

    It is most likely related to this, but without the full error, I can't really provide any help. So if you get the error again, please take a look at it and share the full output.