- Home /
Physics.simulate chews CPU but not using physics at all - Am I?
I have been profiling my application with the profiler. I am using Time.timeScale to control the speed of my application. As I increase the speed by adjusting the time scale, Physics.simulate chews up considerable CPU even though I am not simulating any physics. There are up to 300 calls. using almost as much CPU as Camera.Render!! Anyone have any clues?
Thanks in advance Tom
Can you confirm that you have not a single Collider, Rigidbody, or CharacterController in your scene at all? If you have any of those, you are using the Physics engine.
As far as I know yes. While running in the editor I have gone through all the active objects and I cannot find any of the above mentioned components.
Answer by cncguy · Jul 05, 2010 at 10:22 PM
I can't remember exactly how I fixed this. I think I found something obscure that I was creating dynamically through scripting that had a physics object on it. Once I removed it the physics calls were gone but it didn't turn out to have any appreciable effect on performance.
Answer by Tetrad · Jul 06, 2010 at 12:32 AM
If you want to print out a list of all the components your game objects are using at run time, AngryAnt wrote a decent editor script that collates all the component types and lists them out for you.
http://eej.dk/angryant/general/tipsandtricks/where-did-that-component-go/
So if in the future you need to find something of a particular type, you can use that.