Hi, I try to work with native camera through unity ( capture photo , get from library , save photo ,...) I can bring camera in unity app with UIImagePickerController like this : Code (CSharp): - (void) pickImageFrom:(bool) camera { UnityAppController* uac = (UnityAppController*)[UIApplication sharedApplication].delegate; UIImagePickerController* imagePicker = [[UIImagePickerController alloc] init]; if (camera) { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera ; } } else { imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary ; } imagePicker.delegate = (id)uac.rootViewController ; imagePicker.allowsEditing = YES ; [uac.rootViewController presentViewController:imagePicker animated:YES completion:NULL]; } But i don't know where should i put "didFinishPickingMediaWithInfo" call back to get the result ... Any Idea ?? Thanks in advance
The didFinishPickingMediaWithInfo: delegate method should be in the same class as your pickImageFrom: method. Don't forget to set this class to be the UIImagePickerControllerDelegate.
Thank you @aihodge ... That works I thought image picker delegate must be view controller , but i was wrong