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

Error building Player: Couldn't copy player GI data for scene

Discussion in 'Unity Build Automation' started by jpv1234, Sep 23, 2015.

  1. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Hello, I'm having a very strange build error that is making the builds fail with cloud build. The log is

    [Unity] Error building Player: Couldn't copy player GI data for scene 'Assets/Scenes/GameScene3.unity' into data folder 'level3'
    [Unity] Player export failed. Reason: Error building Player: Couldn't copy player GI data for scene 'Assets/Scenes/GameScene3.unity' into data folder 'level3'

    Any idea what is causing this? I doesn't have any folder named level3
     
  2. Roman-Ilyin

    Roman-Ilyin

    Joined:
    Oct 9, 2013
    Posts:
    28
    Same error after upgrade to Unity 5.2.1.
     
  3. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    I tried making a build, then running the game trough Xcode and it worked without problems. I'm a little bit confused if this is a thing from the server or my project.

    Someone from Unity that can give us a hand please?
     
  4. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    Getting the same issue, on 5.2.1 and 5.2.1p1 - worked fine on 5.1/5.2.0

    Error building Player: Couldn't copy player GI data for scene X into data folder 'archive:/X' etc

    Bit of a showstopper as we need a bunch of fixes from 5.2.1
     
  5. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Any news? =( This is a real slowdown for our game since we have to do a manual build and use testflight to send the build
     
  6. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    Submitted a bug last week - hoping it gets fixed for the next update but no idea where the issue is in the priority...
     
  7. bteitler

    bteitler

    Joined:
    May 11, 2014
    Posts:
    52
    Same issue.
     
  8. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Someone from Unity?
     
  9. bteitler

    bteitler

    Joined:
    May 11, 2014
    Posts:
    52
    Re-baking my one light-map fixed it for me, but clearly this doesn't scale well to people with large projects.
     
  10. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Having the same issue, too which prevents us from building our project.
    Re-baking every single scene would be a really bitter pill to swallow. Is there no other way to have the affected projects build properly?
    It would take several nights to re-bake all of our scenes and to be able to build again.
    We're currently in Early Access with update releases planned every two weeks. The brute force way of re-baking the whole project would have a major impact on our planned time frame.
    So an official statement or workaround way to solve this issue would be really appreciated.
     
  11. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Actually that didn't solve the issue for me. I cleaned all the GI Cache from Unity, and rebaked every single scene. Same problem happening when I tried to make a build in the cloud
     
  12. patrickc

    patrickc

    Unity Technologies

    Joined:
    Jan 23, 2015
    Posts:
    67
    We're investigating this.

    Cheers,
    Patrick
     
  13. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Thanks :)
    I also created a repro case with the number 732324 providing a small scene with the respective errors.
    For us we decided to downgrade back to 5.1 for now.
     
  14. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Did you solve the problem with 5.1? If so, I will do the same. This bug is very frustrating
     
  15. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Yes, with 5.1 everything works fine. I'm gonna check on the newest patch release from yesterday (5.2.1p2) to see if everything works fine now.
     
    jpv1234 likes this.
  16. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Thank you!!
     
  17. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    any luck?
     
  18. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Nope, sadly still present for us in the latest 5.2 patch release :(
     
  19. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    I have looked at the bug in question. It is important to note that there was some previous version of unity 5.1.x where the lightmap asset was not writing out the enlighten data in some situations.

    So if you do get the error message:
    "Lightmap snapshot '%s' is inconsistent - %i files out of %i are missing. Realtime GI will be disabled. Please rebuild lighting for this scene.", this->GetName (), missingFilesCount, hashFiles.size ()), this);


    Then thats exactly what you need to do. You need to actually rebuild the lightmap snapshot.
    The only reason it worked is because the data is cached in your specific GI cache, which is per machine, so other users would not be able to load the corrupted lightmap snapshot. Once rebaked in 5.2 everything should work fine now.
     
    hypeNate likes this.
  20. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    Mmm, interesting. I erased all the GI Cache from the Unity Preferences panel, and rebaked every scene in my project. However same result :(. Am I missing something?
     
  21. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    It's a bit weird, we're working on a couple of different machines and never had that kind of issue in 5.1. Does that mean the data was corrupted on each machine in the same way? During our development in 5.1 we cleared the GI cache several times on a couple ofthose machines, still we didn't have the problem.
    So was the data continually corrupted, no matter how much we clear the cache?

    I'm a bit afraid of upgrading to 5.2 if that means we have to re-build the lighting in every single level. This would cost us a couple of nights of bake time that we actually need for baking the new content.
     
  22. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    So the way i understand this is that. If you in 5.1 delete the GI cache. Then load the scene with the "corrupted" snapshot, then you will get the same error in 5.1.

    So effectively it just worked by accident for you. I don't fully understand the situation in which a corrupt snapshot did get baked in some older 5.1 versions. My understanding is that it is not the case in the latest 5.1 build at the very least? But maybe its dependent on some settings or target platform chosen or something?
     
  23. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    I just checked our project and (judging from the file size) it looks like among the 160 snapshots we have in the project only 9 of them are in a non-corrupted state. All of the others don't even reach 1 MB in size.
    I'll look into the issue for our specific case and see if clearing the cache will produce either produce the build error or give a clean snapshot.
    Gonna post the results here for everyone to refer to and provide a repro-case if cleaning the cache doesn't help.
     
  24. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Sadly after clearing the cache I didn't have any progress on this problem. Building still works despite the clean cache, the newly created snapshots still only have several KBs and I submitted a bug report on this issue with the number 734395.
    Absolutely no idea what we might be doing wrong since we do have a couple of working snapshots (between over 150 corrupted ones).
    I also don't understand why it's only a problem in 5.2. We can still properly build our project in 5.1 even if we clear the cache. Maybe the warning "GI output for inputsystem: [number] is missing." is related to this issue?
     
  25. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    So ok but it seems that in 5.2 the issue of creating corrupt snapshots is now fixed. You need to rebuild the snapshots in 5.2 of course.

    Can you confirm that after rebuilding the snapshot in 5.2 everything works as expected?
     
  26. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Yes, the snapshot is bigger and seems to work correctly. It'll need some time to completely confirm it's working (since we have to re-bake the whole project) but after testing in a single level the warning for this level's snapshot disappeared. Thanks you :)
     
  27. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    I'm still having the issue. I cleared the GI cache, and baked again the lights. Am I missing something?
     
  28. jpv1234

    jpv1234

    Joined:
    Dec 5, 2014
    Posts:
    89
    I'm using 5.2.0f3
     
  29. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    All fixed this end, we just had to rebuild as Joachim suggested. We're using 5.2.1p4
     
  30. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    I tried to bake some more levels in 5.2.1p4. At first glance the issue seems to be solved and we can build the project. The lightmap snapshot still is very small though (110 kb in a scene with several dozen lightmaps).
    Is upgrading to 5.2 a good choice anyway or is there still something wrong with such a small snapshot?
     
  31. dentedpixel

    dentedpixel

    Joined:
    Jul 15, 2012
    Posts:
    683
    I was able to get around this error, by copying over all the items in the broken scene into a fresh scene (in Unity 5.2.2). Clearing the cache and rebaking wasn't working for me.
     
  32. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    We're been using
    //
    We've been using 5.2.2f1 and it has been working pretty well for us.
     
  33. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    has this been fixed?
     
  34. maverikou

    maverikou

    Joined:
    May 25, 2016
    Posts:
    7
    Fixed and broken again