-
class IHookEvent;
bool PlayerLoop ( bool , bool , IHookEvent * ) ;
NSTimer * aTimer;
@implementation AppController
- ( void ) applicationDidBecomeActive : ( UIApplication * ) application{if ( _didResignActive ){[aTimer invalidate];
}
_didResignActive = NO;
}
- ( void ) applicationWillResignActive : ( UIApplication * ) application{aTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(UpdateUnityInTheBackground) userInfo:nil repeats:YES];_didResignActive = YES;}
- ( void ) UpdateUnityInTheBackground{PlayerLoop ( true , true , NULL ) ;}
unity iOS应用切换到后台之后持续运行
最新推荐文章于 2022-03-03 10:16:18 发布