Search Unity

Identical .asset file doesn't load in test project, but it loads in main project

Discussion in 'Editor & General Support' started by Lisk, Feb 19, 2019.

  1. Lisk

    Lisk

    Joined:
    Oct 23, 2013
    Posts:
    99
    Screenshot - 2_19_2019 , 10_40_24 AM.jpg

    The asset file works on the left (gray icon, expandable to see SplatAlphas), but is broken on the right (white icon, not expandable). This results in the terrain failing to load in-game.

    The project is pulled from the same repository and all these files (including .meta files) are version controlled.

    I ran a command-line 'diff' on the two binary .asset files to compare them, and they are the same.
    Screenshot - 2_19_2019 , 10_41_59 AM.jpg
    (if they were different, it would output "differ" - I tested this with other asset files to be sure I'm running the command correctly)

    I tried deleting the .asset and meta files, and re-pulling from version control. Still bugged.

    Then I tried copying the .asset file from the main project to overwrite the test project, and it works. I then tried reverting to the old file, and it broke again.

    >> This doesn't make sense to me - how is it possible that two .asset files which, according to 'diff' and version control are identical - but Unity treats them differently?

    The workaround of copying the working terrain file isn't sustainable for us, because it means the project is broken on version control and any new team member has to manually copy the working terrain in. It also means we can't use a CI/CD pipeline if we have to copy paste the terrain manually.

    Other details:
    - Unity 5.4.5
    - Windows 8/10 (it reproduces on both these OSes)