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

Extreme memory usage

Discussion in 'General Discussion' started by Perillio, Feb 22, 2019.

  1. Perillio

    Perillio

    Joined:
    Feb 4, 2019
    Posts:
    18
    Hi,

    first, im totally new to Unity (but not new to game developement in general). So i made a terrain with Gaia 1.9 which is 4096sqm in size. Used the spawners to place texture, trees and coverage. I just added some trees to the scripts to have more variation.
    After that i created a simple third person player, hokked it the main camera and made a testbuild to see how it really looks later.

    Now i have the unity player uses 22 of my 32GB ram and also the GPU load runs up to 100% (which causes extreme framedrops). Tested with windowed and fullscreen mode on default high settings.

    I made a huge terrain on another engine some time ago and it runs smoothly so i guess the unity player needs some tweaks i dont know of to run without such extreme consumption of ressources.
    Its almost the same amount under Windows and Linux. Using the editor under windows.

    Developement PC Specs:

    AMD fx 8320e
    nVidia GTX 750Ti
    32GB ram
    Windows 10 Pro x64 / Linux Mint 18.1 x64

    So if anyone can give me some hints to reduce the load on at least GPU whould be nice.

    Greetings
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    Run your game in the editor and hit Ctrl+7. The profiler window will appear. It will show you what takes time and consumes memory so much.
     
  3. Perillio

    Perillio

    Joined:
    Feb 4, 2019
    Posts:
    18
    Tried. In that profiler window it looks all fine. Also the playmode in the editor works good. Just that it looks like it uses lowest possible settings in there.
    For the ram usage it seems like the Meshes are using a good amount of it (3,2GB in profiler).

    Tried it on fullscreen 1024x768 with high settings now and there it works fine. Still 6GB usage of ram but only ~30% GPU usage which is ok. Seems like my graphics card dont like my fullscreen settings for normal HD use (1824x1036 due to overscan) and fills up normal memory with stuff because the GTX750 Ti only has 2GB dedicated ram.

    Also i noticed, that i forgot to bake the lighting. Could this be what causes trouble ?

    UPDATE:

    80% GPU usage after baking. So it seems like this was the main problem. :)
     
    Last edited: Feb 22, 2019