Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Importing (iteration 56)?

Discussion in '2019.3 Beta' started by Peter77, Sep 7, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I was opening a 2018.4.6f1 project in 2019.3.0b2 and saw for the first time Unity displays an iteration number during the import.

    What is this telling me?

    upload_2019-9-7_10-8-9.png
     
  2. Unity_Javier

    Unity_Javier

    Unity Technologies

    Joined:
    Mar 7, 2018
    Posts:
    190
    Hey,
    So this means that something telling Unity to import an asset over and over again.

    We've seen this happen when, for example, an AssetPostprocessor is re-importing an importer via calling AssetImporter.SaveAndReImport inside OnPostProcessAllAssets. Another reason could be that ForceReserializeAssets is being called inside one of the AssetPostProcessor callbacks as well (including OnPostProcessAllAssets), causing the asset to be flagged as requiring an import and restarting the import loop.

    Generally more than 8 iterations shows that something is up as its rare that a project keeps generating more and more assets as the import process continues, but it is possible.

    Would it be possible for you to create a bug for this where you include the repro steps so we can take a look at it in more detail?
     
    Peter77 likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Thanks for your answer. I do have various AssetPostprocessors and some generate/update assets, but I don't think this should cause the same asset to be imported 56 times.

    I'll check at the weekend if it occurs every time I reimport the project and prepare a bug-report for it in this case.

    Can I find additional information what asset(s) have been imported those 56 times somewhere?

    Thanks!
     
  4. Unity_Javier

    Unity_Javier

    Unity Technologies

    Joined:
    Mar 7, 2018
    Posts:
    190
    The Editor log would be the best place to look.

    In there we output what assets are being imported, so if the same assets show up over and over again that would be it.

    If the log is quite large, you can use VSCode and look for lines that say:
    1."Start importing"
    2. Select all instances of the match (Shortcut)
    3. Copy and paste them to Google Sheets
    4. Sort the entries
    5. Make the highlight rule from here

    Then you can visually see which log entries are duplicated.
     
  5. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    I have recognized one problem with the v2 pipeline resulting in slow imports and some importers possibly misbehaving: Batch editing using Start/StopAssetEditing still raises an OnProjectChanged event eg when calling CreateAsset. The project view handles this event, updates itself and forces everything to rerender synchronously.
    Closing all project views before importing speeds things up alot but I think importers might still behave differently due to additional events compared to v1 pipeline.
     
    Unity_Javier likes this.
  6. Unity_Javier

    Unity_Javier

    Unity Technologies

    Joined:
    Mar 7, 2018
    Posts:
    190
    Thanks, I'll bring that up wit the rest of the team and see if it is necessary or not for that callback to be triggered.
     
    julian-moschuering likes this.
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I just tried to reproduce it with 2019.3.0b4 two times, but the issue didn't occur.
    I first saw the "iteration 56" thing when opened the project from Case 1108597 in 2018.4.6f1 and then 2019.3.

    I'll update this thread if I see this issue again, but for now it seems I'm unable to reproduce.
     
    Unity_Javier likes this.
  8. sensisaw6

    sensisaw6

    Joined:
    Nov 26, 2018
    Posts:
    3
    Hello Javier, i have the same problem but this time i have (importing : iteration 2) every 3/4 seconds, if you have the time, could you see what's wrong in my project? i don't where can i send you my project?
     
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could you please submit a bug report with a detailed description of what you're experiencing? You can attach your project to it and we will have a look at it. Instructions are in my signature.
     
  10. sensisaw6

    sensisaw6

    Joined:
    Nov 26, 2018
    Posts:
    3
    Thank you, i sent a report bug with project.
     
    LeonhardP likes this.