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

Meta file serialization on multiple machines results in differences

Discussion in 'Editor & General Support' started by Steamroller, May 20, 2016.

  1. Steamroller

    Steamroller

    Joined:
    Jan 2, 2013
    Posts:
    71
    Hey All,

    I wonder if anyone else has run into these problems:

    The first is that some machines write out floats with a leading zero and some machines don't



    As you can see here the heightScale and spritePivot have the same values but still results in a diff as far as version control is concerned.

    The second problem we are seeing is that floating point values are rounding slightly different. We have even seen this happen on the same machine, like we check all these changes into our version control system and then go back into Unity, don't change a thing, just tell Unity to save the project again, and go back to our version control system and the values are slightly different again.



    All machines are the same version of Unity and OS.

    As you can imagine this is a real source of pain for us when it comes to dealing with which files have actually changed and which ones have only slightly changed.

    Any help would be appreciated.
     

    Attached Files:

  2. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    Weird, never encountered that. Could it be that you have some asset pre/post processor that is touching the files in the project? That may account for the float. The leading zeros though is pretty odd.

    Also, what version of unity? Is it a new problem?
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Are you sure you have the exact same version of the editor on both machines? Also, are both on the same OS (e.g: both are Windows or OSX) ?
     
  4. Steamroller

    Steamroller

    Joined:
    Jan 2, 2013
    Posts:
    71
    We are using Unity 5.3.4 on all our machines. Its been a problem for as long as we have been using Unity, we have just been dealing with it.

    We are all on the same OS (Windows)
     
  5. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    Wow. That would be annoying. It should be solvable. We use many different machines (Mac/win/Linux) and never encountered that. What vcs are you using?

    We did have issue once where one person had had changed their editor serialazation to binary, and committed. When others pulled it propagated and very quickly every pull/commit was changing back and forth. Our solution was to have one person commit the proper files and every one do a pull before anyone pushed. It stopped the propagation and everyone was good after that. You might try something like that.
     
  6. Lszt

    Lszt

    Joined:
    Sep 28, 2015
    Posts:
    38
    We have the same issue here. And have only guy who commits something is not the solution. We are still trying to find a solution cause it creates diff between files for nothing :x. And worst of all we work with asset Bundle and this seems to create a diff for the asset Bundle when we try to build them. It's really painful cause it mustn't. We are still trying to understand why even between unity engine update this happen. I mean the floating approximation, even between unity version should be the same :). With different os (windows or Mac or Linux) ok but engine..
     
  7. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    That is not the solution I was suggesting. The solution was to have one person do a commit, and everyone pull right after that. Not every time, just once. That made sure that everyone was in the same state with regards to serialization type. After that, no problems. That was only due to the serialization method getting out of sync. That probably wouldn't help if there are other issues.
     
    shaderop likes this.
  8. Lszt

    Lszt

    Joined:
    Sep 28, 2015
    Posts:
    38
    Yeah I'm totally agree with that.
    Sorry my answer wasn't really clear.
    The main issue for me is the fact that asset bundle could be rebuild whereas the only difference between metas are the change to 0.25 from .25 that is not logical for me.
    We can say ok let's rebuilt this but after this the user must redownload all asset bundle just because of this which is not good :/
     
    Last edited: Jun 20, 2016