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

Stoopid Question Time - Need Advice.

Discussion in 'Editor & General Support' started by CelticKnight, Oct 8, 2018.

  1. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378
    Hello All,

    Trying to be a conscientious developer, I just backed up the files I had of a game, I just had a an incident that took over a week to fix and lost quite a bit of work. So just to check that the backup went fine and was working I opened it back up in Unity5.6.1 yes I haven't upgraded yet I'm terrified of having another incident like I just had.

    Anyway, I have no idea how to open the project I just backed up so I went into Unity and opened the project by the scene file, to make sure i didn't open in Unity 2017,and after it loaded up the scene/project preceded to tell me there are errors in the file, and wouldn't run.

    So, what do I have to do to make sure the backup is in working order, so, I can have a working copy of the game if it goes belly up again?

    EDIT: I loaded up the original file just now and now it isn't working either!?!?! I can't fraking understand Unity. I fraking give up :confused::(:mad:.

    Thankyou and Regards.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,998
    look up using Version Control with unity, its much better than manual/file copy backups..(as long as you commit your changes often, you'll be safe)
     
  3. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378
    I look into if I can't get this version of the game working again! 3 months work down the tube :(:(:(. At least I have all the source files, so, worst comes to worst I can type it out all over the source files again - the nightmare part by far will be doing all the animation files again :(:eek::oops:

    For a starting point what do you use?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Point the Unity Open dialog at the root of the copied project. The root contains the other folders like /Asset and /Library. So you don't open a "file", you open a "folder"
     
  5. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378
    Did not know that!

    Would opening the project using a scene like I did cause both the backup and original file to stop working? Or, have I really screwed up my project good and proper in some other way?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please define "stopped working", do you receive an error? If so, please post the exact text here.
     
  7. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378
    Well, it a bit hard to define stopped working. The inventory system stopped working giving me errors I can no longer pick up or drop items, there are problems with the player prefab, no longer producing the correct weapon number I have to set a default value because it won't accept the line in the script anymore, the camera following script just stopped altogether, no errors. I understand what the errors are, but, I cannot correct them. The dialog system is also giving me problemsw. Like I said the code was working before I went and saved a backup and started it up again. I have checked over the code again and again and everything is the same.

    I had the same errors a week ago, that fixed up after replacing the player prefab with an older prefab and went through the code with a fine tooth comb fixing the errors and function that had been mysteriously disappeared with a number of prefabs putting them back again, and it worked only to get them back.

    NullReferenceException: Object reference not set to an instance of an object
    PickupScript.Start () (at Assets/PickupScript.cs:30)

    NullReferenceException: Object reference not set to an instance of an object
    Slot.Update () (at Assets/Slot.cs:37)

    NullReferenceException: Object reference not set to an instance of an object
    Player_Attack.Update () (at Assets/Player_Attack.cs:95)

    NullReferenceException: Object reference not set to an instance of an object
    PickupScript.OnTriggerEnter2D (UnityEngine.Collider2D col) (at Assets/PickupScript.cs:50)

    These errors would seem to be no-brainers but the code did work, everything was defined correctly, something is very wrong I know there is, but, I don't know what it is. Yeah, I know what you are thinking you are just a stoopid noob and for a lot of things I would agree. So much so that I am about to spend $100 trying to rollback the computer to before the errors occurred.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Make sure to make frequenct back ups! And/or use source code control
     
  9. CelticKnight

    CelticKnight

    Joined:
    Jan 12, 2015
    Posts:
    378