Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice
  2. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

How can I disable Physics.Simulate?

Discussion in 'Editor & General Support' started by kronholm, Mar 7, 2011.

  1. kronholm

    kronholm

    Joined:
    Oct 1, 2010
    Posts:
    26
    In my semi-noobish game, I notice in the profiler in the editor, that Physics.Simulate is taking up 16% of the total CPU usage in my program. Is there any way to disable everything involving physics, perhaps at runtime via C#?

    I do not have any physics related objects in the game, nor any colliders for buttons etc.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,325
    Set the fixed timestep in the time manager as high as possible so that physics doesn't run very often.

    --Eric
     
  3. kronholm

    kronholm

    Joined:
    Oct 1, 2010
    Posts:
    26
    Make the game run faster and waste even more CPU? Is that really a solution? :)
     
  4. oxl

    oxl

    Joined:
    Nov 21, 2008
    Posts:
    325
    He wrote timestep , not timescale .

    --
    oxl
     
    Last edited: Oct 11, 2011
  5. kronholm

    kronholm

    Joined:
    Oct 1, 2010
    Posts:
    26
    Ahh yes, sorry bout that :) Thanks.
     
unityunity