Search Unity

Object count insanity!!!!

Discussion in 'Editor & General Support' started by tawdry, Jan 10, 2019.

  1. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,212
    Hi
    Why does unity have a fit with large amounts of objects is there a hard coded thing or does the power of the user computer come into play. For instance if i create a million empties and press play unity will crash whats the cause of this ?Would a more powerful computer be able to handle more objects or is the limit exist with unity itself?
     
    Last edited: Jan 10, 2019
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,685
    A million objects? What is the real issue that you are having?
     
  3. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,212
    Just stress testing but why does unity struggle with a million empties I would think they they should not have any noticible impact So what is the process when dealing with an object even an empty one?And if i had a supercuputer could i far exceed this test or is unity the bottleneck here?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,685
    Perhaps if you shared your code or tried on a different computer using a binary search approach to see where it falls over you might be able to determine. In the meantime, you might consider using the Unity Profiler https://docs.unity3d.com/Manual/Profiler.html
     
  5. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    3,246
    You might be interested to take a look at the following thread. GameObject's are very costly and the editor starts to surrender when using a few ten-thousands:
    https://forum.unity.com/threads/5-6...e-of-open-savescene-and-enterplaymode.447500/

    Related issue-tracker item:
    https://issuetracker.unity3d.com/issues/non-linear-editor-performance-of-savescene-and-enterplaymode

    I believe Unity's entity component system is solving this issue, but it's only in preview at the time of writing. As far as I remember, this talk mentions the "megacity" scene contains millions of entities.
     
    Last edited: Jan 11, 2019
    JeffDUnity3D likes this.
  6. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,212
    Hey Jeff
    there was no code it was a blank scene and I just duplicated an empty a million or so times.
     
  7. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,212
    Hi Peter
    Yea I saw that video but I'm using 5.66 so ecs is never coming my way at least not in the foreseeable future
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,685
    Not my point. Point was to compare. But it's not needed now, we got our answer!