Search Unity

Question Should I deal with the massive number of used Unity Snap prefabs in my game?

Discussion in 'World Building' started by Coadon_Pile, Jul 26, 2022.

  1. Coadon_Pile

    Coadon_Pile

    Joined:
    Sep 18, 2020
    Posts:
    4
    I'm recently creating a simple indoor FPS game in where the environment of the game scene is built using the Unity Snap Assets, specifically the Snaps Prototype ones.

    Here are the links:
    https://assetstore.unity.com/packages/3d/environments/snaps-prototype-office-137490
    https://assetstore.unity.com/packag...i-fi/snaps-prototype-sci-fi-industrial-136759

    However, I'm kind of unsure if those snap assets are going to cause performance issues as thousands of distinct game objects are laying around.
    Should I leave them alone, or should do something about it?

    I do know that marking them static is an option, but is it necessary to reduce the number of game objects as well?
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    If you start to see performance problems, look at the profiler to determine the actual cause. When you come to a point where you have too many objects, there are plenty of "combine mesh" scripts floating around. Objects that use the same material are especially easy to combine.

    More individual objects means more transforms to calculate and more drawcalls, so you may run into performance problems with too many objects. On the other hand, you don't want combine the entire level in to one big object either. Unity has a built-in optimization where it will not render objects outside of the camera's viewing area, but if everything is combined in to one then Unity can't exclude anything.
     
  3. Coadon_Pile

    Coadon_Pile

    Joined:
    Sep 18, 2020
    Posts:
    4
    Alright, thanks.