Media Picker

Hi I am fairly new to Unity and I’m having a problem with the media picker for play your own music. Basically I use a plug-in script to call the media picker initializer (controller). The controller calls [self presentModalViewController: picker animated: YES]; The code is very similar to the example in the iPhone SDK; but the MusicPicker does not seem to appear. Instead unity continues to run. I just want to know if it’s possible to do this and therefore I’ll know if it’s my code or not.

Cheers

I’m not real familiar with the details of what you’re doing because I haven’t done this yet-- but I’m guessing that the problem is that the view of the picker is behind the unity view in the stack. You probably want to call UnityPause() on the Cocoa side, and push a new view onto the view stack and then on that view call the showModalView function. (Also I think there’s a special music modal view tht you want to be invoking, but I’m assuming that’s what you’re doing.)

If you’re unable to figure it out, you can post the relevant code here and we might be able to see what’s wrong.

Hey thanks for replying.

I managed to get the ‘play your own music’ feature in. I was trying to call a modal view screen (i.e. the picker) straight over the top of Unity. This seemed to be the problem. Instead I created a intermediary screen which I added as a sub view of the main window. From this view I could then open the media picker without any problems. This is the way suggested by Apple in their example but I was just hoping to cut out the middle man.

Thanks anyway