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

Distributing and Updating our Unity MMO causes error at game launch

Discussion in 'Editor & General Support' started by Behaviour, Jan 19, 2017.

  1. Behaviour

    Behaviour

    Joined:
    Oct 4, 2015
    Posts:
    10
    Hello, I've set up all the infrastructure to be able to push new versions of our Unity MMO to whoever has installed our custom built launcher or game updater (whatever you want to call it). It checks for the local version of our game and compares that with the 'server' version and based off of that info it decides whether or not the game should update.

    The way we want this to work is that whenever we add stuff to our game, the launcher will download only new files. This is very important because we don't want people to have to redownload the entire game whenever make a change. Especially once we get into GB size.

    The launcher works fine - it retrieves all the files that are given by the Unity Editor when you build your game and neatly orders the files back into the directories they should be in. However, when you then try to start the game this happens:

    I've confirmed the problem doesn't lie with the way our launcher downloads and sorts the files. The file structure is intact.
    By manually drag-and-dropping files to the server and retrieving them the same way (using FTP) we get the same error even though the file structure is exactly the same as it was before the upload.

    The only logical explanation for this error to occur (that we can come up with at least) is that transferring the Unity game files over FTP breaks the Unity game somehow, or corrupts some of the files/data.

    We've even attempted to move files one-by-one to maybe find out what files are causing the issue and there indeed seem to be some files that are responsible for the error, whilst others are not. So far we know that the globalgamemanagers file in the GameName_Data folder is one of the culprits.

    The weird thing is that if we were to .zip/.rar our game and then upload it to our server, then let our launcher download the .zip/.rar and extract it does not cause any errors if you were to then run the game again - which only feeds into the idea that the FTP is the cause. Although this may be considered a workaround, this is not the way we want to approach this; because we cannot update on the individual file level using this method. We'd have to force our players to redownload their entire game.

    Hopefully someone is able to help us out.
     
    Last edited: Jan 19, 2017
  2. XaeroDegreaz

    XaeroDegreaz

    Joined:
    Feb 6, 2010
    Posts:
    15
    Are you uploading your project on FTP using binary mode? Might double check that setting.

    Lots of times FTP clients will default to "Auto" or something like that. Sometimes it guesses incorrectly and uploads your data in ASCII mode.

    It's probably a good practice to just always upload in binary unless you have a specific reason not to.
     
    Behaviour likes this.
  3. Behaviour

    Behaviour

    Joined:
    Oct 4, 2015
    Posts:
    10
    Sorry for the delayed response. The problem did indeed emerge because of the files not being uploaded to the server properly, we've had to adapt our launcher to solve the issue but thanks for your input.
     
  4. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    Hey Bahaviour,

    We have the same problem and we are using the patcher asset call Coffee Beans Patcher, this happens after we pushed an update. Which file in your case corrupted? Is that the player settings file or it can be any file?