This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) registerAdmob | |
{ | |
NSLog(@"-> registerAdmob initializing Admob start"); | |
UnityViewController* controller = (UnityViewController*)UnityGetGLViewController(); | |
EAGLView* view = (EAGLView*)[controller view]; | |
NSLog(@"EAGLView frame size:(%f, %f)", view.frame.size.width, view.frame.size.height); | |
CGFloat scaleSize = [UIScreen mainScreen].scale; | |
NSLog(@"UIScreen scale:%f", scaleSize); | |
CGFloat screenWidth = view.frame.size.height * scaleSize; | |
CGFloat bannerWidth = GAD_SIZE_320x50.width; |