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

Lost all Scene elements with 2019.2 upgrade

Discussion in 'Editor & General Support' started by Cypherfox, Aug 19, 2019.

  1. Cypherfox

    Cypherfox

    Joined:
    Nov 28, 2015
    Posts:
    6
    Greetings,
    I had a project, thankfully just something I was building with my kids, that I'd put together in 2018.3. I upgraded to 2019.2 today, and...it's all gone. The files still exist (scripts, images, etc.) but the scene has none of the objects. There's a Main Camera, and...nothing else. Everything's in the Assets folders, but it's not together.

    I'm just...aghast.

    My kids wanted to work on it, and I made some excuses, and I'll have to spend a few hours putting back together what we'd built. I've had this happen before; for example, I've never managed to get Unity on their computers to load a git clone of a Unity project and have the objects in place. But I thought that was just some file I was missing that must not be in the project tree. This is on the same computer, same files, just a different version.

    Sure; I didn't have it in version control, which was my fault. I didn't expect an upgrade of Unity to...I don't even know...wipe my Scene out entirely?

    Has anyone ever had any luck getting it back, when that happens? What should I look for? How do I keep it from happening again?

    -- Morgan
     
  2. Cypherfox

    Cypherfox

    Joined:
    Nov 28, 2015
    Posts:
    6
    Greetings,
    Oh. A bit more searching, and I bet I know what happened.

    It appears that Unity will overwrite Scenes with the same name (or same GUID?) without prompting, if you import a package that has that scene.

    The Scene we were building was probably under 'SampleScene', since that automatically exists when starting up, and when upgrading the assets, Unity probably re-imported whatever provides SampleScene, and because it had the same name or GUID, it overwrote my scene.

    That's...pretty awful.

    That's a terrible, terrible bug.

    -- Morgan

    [Edit: I wonder if that's why my attempts at cloning simple projects to my kids computers haven't worked; the Unity editor on the far end overwrites my scene, because I'm new at this, and put everything in SampleScene to start with.]
     
    Last edited: Aug 19, 2019
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,204
    Unity doesn't re-generate the sample scene ever. There's probably something else funky going on.

    Making git work with Unity is pretty straight-forward:
    - Set the project to "use visible meta files"
    - Use a .gitignore to ignore the Library/ and Temp/ folders (you'd usually just copy one)
    - That's it.

    To open the project on a different computer, just clone it into a new folder and select "Add" in the Hub menu. I guess what you're describing could happen if you try to make a new project in the location you cloned to.
     
  4. Cypherfox

    Cypherfox

    Joined:
    Nov 28, 2015
    Posts:
    6
    Greetings,
    That's fair; I've tried to replicate that sequence on another computer (creating a project in one rev, adding some stuff to the sample scene, loading it in another) and it doesn't fail obviously. I really don't know, and I'm tired and frustrated. I've got it mostly back to where I was.

    I was hoping very much that it was that as a problem, because then it's understandable and avoidable. It seemed that the SampleScene.unity file was (after the project was upgraded to 2019.2) dated some time in 2018, when I'd created it a few days ago.

    If it's not that, then...there's no way to know when a Unity upgrade is just going to eat my scene. Which...sure, it means version control is absolutely required, which is a best practice anyway, but that's still...pretty awful uncertainty. I'm just frustrated, right now, and I was hoping it was something straightforward, because the signs pointed that way.

    -- Morgan