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

Is one level w/10 objects better than 10 leevls w/1object?

Discussion in 'Editor & General Support' started by DaveyJJ, Aug 23, 2005.

  1. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    Assuming that all other things are the same (scripts, models, poly count etc), is one level with 10 objects better/worse/same for file size and load times compared to 10 levels each with one object?

    And do all 10 objects get loaded in either case?

    Scrambling here to finish the challenge... :wink:
     
  2. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    The same...

    If you begin to have a many, many visible objects it would make sense to split them into levels.

    Theoretically, loading is faster when you have them spread out. In practice, you get a hit on the first level (as we upload all shaders to your GFX card), then it's fast.

    The typical GooBall level loaded in about 1 sec. 100 objects on average.

    EDIT: We preload all objects in a scene, so you might see a small performance difference in loading times.

    For the contest: go with what is easiest for you.
    In general: Go with what is easiest, then change it ONLY if it becomes a performance problem.
     
  3. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    Excellent, I think. That way there's far fewer coordinates to remember and code if you're moving objects around and buttons can just be used go from level to level without worry about enabling other cameras (which I still struggle with), moving GameObjects around, etc. Time up in a level? Load another level. Click button to begin game, load another level. Cool.

    I'll back up our thing and try this method.

    And then destroy or "uninstantiate" objects on level A when you load level B? Or does that automatically happen except for the stuff on level 0? And when you load level A back it reloads the stuff, right?
     
  4. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    All objects that are not part of level 0 or have DontDestroyOnLoad are destroyed automatically...

    We also unload textures that are not used in the new scene, etc...

    In short, not only can we load data much faster than the hard drive can deliver it to us, we also try to be really clever to only load as little data as possible...