Search Unity

Maximizing FPS - disabling rooms in a scene

Discussion in 'General Discussion' started by Vanz, Nov 25, 2021.

  1. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    Is this an acceptable way to gain FPS? To disable/enable rooms within the same scene, it may not help with culling objects to draw but it turns off all NPC's, physics, particles, sounds ...etc that are not near the player.

    I'm trying to eek out every little FPS for VR...

    Thanks,

    Vanz
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    What it even means "acceptable" in this context?

    I think it is quite obvious, that you don't want to run anything that is uneccessery for gameplay and player experience.

    So yes, you can disable / hide / unload things which are not in use.
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,563
    If it works, then yes it is.

    I'd check if disabling renderer alone first produces sufficient effect.
     
    Joe-Censored and Antypodish like this.
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,135
    This is just pretty standard logic culling. If you want to get more performance though, your best bet is to use the profiler to figure out what's eating most of your rendering time.
     
    Joe-Censored likes this.
  5. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    yeah, "acceptable" was not a great choice of words, I meant is this a "good practice" or should it be avoided for some reason I was not aware of...
     
  6. Vanz

    Vanz

    Joined:
    Nov 19, 2013
    Posts:
    374
    yes, been using profiler, a lot of remaining time usage falls under the "other catagory", Ive already done a ton of graphic optimizations, looking for even more...
     
  7. This just popped up on my YT for some reason.
     
    zombiegorilla likes this.
  8. SoyUnBonus

    SoyUnBonus

    Joined:
    Jan 19, 2015
    Posts:
    43
    This is what we do in Ziggurat 2. You have to be careful what scripts do during 'onEnable' and such, to avoid performance hiccups but, other than that, optimize yourself all you can, don't leave everything to the engine.
     
    PutridEx and neginfinity like this.
  9. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Various tricks, cutting corners, etc, are all standard practice in game dev. For example, I read a dev blog once regarding a AAA game where they extended the road leading to a town in the scene, to make the player run down the road longer, just to add additional time to load in all the textures before they got to the town. Those kind of hacky solutions are what game dev is really made of :p