Run script every game loop (For a 2D Physics Engine)

I’m currently in the learning mode with Unity but I do have quite a bit of experience with other platforms/engines.

If I were to port a 2D physics engine into Unity that requires Update to be called every game loop how would I set this up in Unity?

Would I create a PhysicsEngine GameObject and add a PhysicsLoop component and then just override the Update method and have it call the physics engine’s update method?

Is there a different/better way of running the physics engine loop?

Thanks,

Jeff
www.farseergames.com

You have several options, here are a few:
Call it in a singleton-like GameObject’s Update() - runs every frame
Call it in a singelton-like GameObject’s FixedUpdate() - runs every fixed interval (probably what you want)
Call it via a Coroutine - may also be what you want.