Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Resources.UnloadUnusedAssets run time becomes longer

Discussion in 'Editor & General Support' started by Magicdaw, Mar 26, 2021.

  1. Magicdaw

    Magicdaw

    Joined:
    Dec 1, 2017
    Posts:
    1
    we run our game in "CloseUI -> LoadSceneAsync("sceneName". LoadSceneMode.Single) -> OpenAnotherUI"
    flow, but with several times loading scenes, the game quit without any error log. The output_log.txt log shows that asset unloading time become longer. Any advice to fix it?

    System memory in use before: 91.1 MB.
    System memory in use after: 91.7 MB.

    Unloading 1 unused Assets to reduce memory usage. Loaded Objects now: 11600.
    Total: 7.206900 ms (FindLiveObjects: 0.574000 ms CreateObjectMapping: 0.190300 ms MarkObjects: 6.430500 ms DeleteObjects: 0.011600 ms)

    System memory in use before: 199.0 MB.
    System memory in use after: 193.9 MB.

    Unloading 250 unused Assets to reduce memory usage. Loaded Objects now: 9901.
    Total: 12.523200 ms (FindLiveObjects: 0.540200 ms CreateObjectMapping: 0.216700 ms MarkObjects: 11.357600 ms DeleteObjects: 0.408300 ms)

    System memory in use before: 232.7 MB.
    System memory in use after: 231.6 MB.

    Unloading 3 unused Assets to reduce memory usage. Loaded Objects now: 14406.
    Total: 21.306000 ms (FindLiveObjects: 0.838600 ms CreateObjectMapping: 0.352600 ms MarkObjects: 20.080600 ms DeleteObjects: 0.033800 ms)

    System memory in use before: 232.8 MB.
    System memory in use after: 232.3 MB.

    Unloading 3 unused Assets to reduce memory usage. Loaded Objects now: 14429.
    Total: 30.915200 ms (FindLiveObjects: 0.877600 ms CreateObjectMapping: 0.349900 ms MarkObjects: 29.658500 ms DeleteObjects: 0.028800 ms)

    System memory in use before: 234.0 MB.
    System memory in use after: 234.1 MB.

    Unloading 3 unused Assets to reduce memory usage. Loaded Objects now: 14545.
    Total: 37.730400 ms (FindLiveObjects: 0.915800 ms CreateObjectMapping: 0.428500 ms MarkObjects: 36.356400 ms DeleteObjects: 0.029000 ms)

    System memory in use before: 234.5 MB.
    System memory in use after: 234.6 MB.

    Unloading 3 unused Assets to reduce memory usage. Loaded Objects now: 14613.
    Total: 44.262300 ms (FindLiveObjects: 0.713300 ms CreateObjectMapping: 0.320400 ms MarkObjects: 43.160000 ms DeleteObjects: 0.067900 ms)

    System memory in use before: 233.0 MB.
    System memory in use after: 233.1 MB.

    Unloading 3 unused Assets to reduce memory usage. Loaded Objects now: 14372.
    Total: 52.095900 ms (FindLiveObjects: 0.908500 ms CreateObjectMapping: 0.326600 ms MarkObjects: 50.827900 ms DeleteObjects: 0.032400 ms)

    System memory in use before: 233.1 MB.
    System memory in use after: 233.2 MB.

    Unloading 3 unused Assets to reduce memory usage. Loaded Objects now: 14331.
    Total: 59.308700 ms (FindLiveObjects: 0.724300 ms CreateObjectMapping: 0.318300 ms MarkObjects: 58.231400 ms DeleteObjects: 0.034100 ms)

    System memory in use before: 234.6 MB.
     
  2. MiguelAppStudio

    MiguelAppStudio

    Joined:
    Nov 17, 2020
    Posts:
    19
    sorry to bother
    Have you managed to solve this problem @Magicdaw
    ?
    I find myself in the same situation on iPhone, an infinite loop is created and it's been four days trying to find a solution