Hi,
I can’t find any details regarding FALLBACK_LOOP_TYPE. Could you explain what the 3 possible settings are?
Thanks,
Mark
Hi,
I can’t find any details regarding FALLBACK_LOOP_TYPE. Could you explain what the 3 possible settings are?
Thanks,
Mark
The 3 options are found in the built xcode project, one is a timer based, one is threaded based. There is a significant amount of comments in AppController.mm
// NSTIMER_BASED_LOOP
//
// It is a common approach to use NSTimer for scheduling rendering on a pre 3.1 device
// NSTimer approach is perfect for non-performance critical applications which favours battery life
// and scrupulous correct events processing over the rendering performance.
//
// Constants supported by this method: kThrottleFPS, kFPS
// THREAD_BASED_LOOP
//
// However number of games might prefer frame-rate over battery life,
// therefore Unity provide alternate methods which allows you to run in a tighter rendering loop.
// Thread based loop allows to get best of two worlds - fast rendering and guaranteed event processing.
//
// Constants supported by this method: kFPS
// EVENT_PUMP_BASED_LOOP
//
// Following method allows you to specify explicit time limit for OS to process events.
// Though it might lend you best rendering performance some input events maybe missing,
// therefore you must carefully tweak kMillisecondsPerFrameToProcessEvents to achieve desired responsivness.
//
// Constants supported by this method: kMillisecondsPerFrameToProcessEvents, kFPS
// Constants:
//
// kFPS - allows you to set desired framerate in frames per second. Set to 30 by default.
// Normally game will not run faster than specified by kFPS. Note that iPhone device can not render faster than 60 frames per second.
// kThrottleFPS - usually you need to boost NSTimer approach a bit to get any decent performance. Set to 2 by default.
// Meaningful only if NSTIMER_BASED_LOOP method is used.
// kMillisecondsPerFrameToProcessEvents - allows you to specify how much time you allow to process events if OS event pump method is used. Set to 3ms by default.
// Settings kMillisecondsPerFrameToProcessEvents to 0 will make main loop to wait for OS to pump all events.
// Meaningful only if EVENT_PUMP_BASED_LOOP method is used.