Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Unable to open scene/.unity files from the editor's "Project" or "Inspector" window

Discussion in 'Editor & General Support' started by HunterAhlquist, Sep 3, 2022.

  1. HunterAhlquist

    HunterAhlquist

    Joined:
    Oct 6, 2013
    Posts:
    129
    I've had this problem for a long time, but I just kinda dealt with it, now it's really slowing me down having to use File>Open Scene when I can't get to it from File>Open Recent Scene.
    I am unable to open any scene (.unity) file from within the "Project" window in the editor. I have tried to double click, and use the inspect>open button. The editor just doesn't register the input and stays in the current open scene.
    I'm on 2020.3.38 and I'm using JetBrains Rider 2022.1.2 with it's respective code editor package installed.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    Weird... perhaps .unity files got mapped to some other application? Try doing it from Finder / Explorer and remove that affinity.

    Barring that, can you drag a scene into the Hierarchy window to open it??
     
  3. HunterAhlquist

    HunterAhlquist

    Joined:
    Oct 6, 2013
    Posts:
    129
    This is what I get for my app associations for .untiy, appears to be normal as I don't use 2021 for this project.
    upload_2022-9-3_13-1-12.png

    Unfortunately either app doesn't fix the issue. I can however open scenes like normal in 2021, and a new project in 2020 works as well. Any project specific settings I can reset to try and diagnose?
    It also seems I can open scenes by dragging into the Hierarchy window and closing the old scene, it's a better option than File>Open Scene, thank you.
     
    Last edited: Sep 3, 2022
    Kurt-Dekker likes this.
  4. HunterAhlquist

    HunterAhlquist

    Joined:
    Oct 6, 2013
    Posts:
    129
    I know this is old, but just to close out this issue. I today found out that OnOpenAssetAttribute and OnOpenAsset will take over the event for ALL files. So you must return false when the type your using for doesn't match for it to fallback to its default behavior. I had the return value set to true which told the event that the double click was handled.
    I was using it to double click to open a custom editor I had.

    More specifically, I think the attribute adds your method to a list of events, when it returns true that means the event chain stops as you told the processer that you handled the event and it should stop going through the events.