Strangely my application crashes when loading an additiv level. I only get the error when the application comes from the app store not when i just build it and run it on my device. I attached the crash log but I am not really able to read it myself. Would be great if somebody has a solution
Hi Fred’sIphone, what version of U3DXT are you using? Also, it seems that you are using the Social module’s Twitter or Facebook class. Can you paste some code of how you are using them? Thanks.
Yes I use the social module but not in the scene in which the game crashes. There I use the webview and the mediaplayer.
So my social code is:
function Share()
{
var obj : Object = new Object[2];
var toPost : String;
toPost = "some kind of string.";
obj[0] = toPost as Object;
obj[1] = "some kind of link" as Object;
//obj[2] = logo as Object;
var str : String[] = new String[2];
str[0] = UIActivity.TypeAssignToContact;
str[1] = UIActivity.TypeCopyToPasteboard;
SocialXT.Share(obj, str);
NSURLRequest _request = null;
NSURL _url = null;
public void setURL(string url)
{
lock(_webview){
_url = new NSURL(url);
_request = new NSURLRequest( _url );
_webview.LoadRequest(_request);
}
}
and my media player is :
void Start ()
{
play.gameObject.SetActive(false);
if ( !CoreXT.IsDevice )
{
return;
}
musicPlayerController = new MPMusicPlayerController();
// whenever the now playing item changes, just play it
musicPlayerController.NowPlayingItemDidChange += delegate(object sender, U3DXT.iOS.Native.Foundation.NSNotificationEventArgs e)
{
musicPlayerController.Play();
};
MPMediaQuery query = new MPMediaQuery();
object[] items = query.items;
mediaItem = (MPMediaItem)items[Random.Range(0, items.Length)]; // randomly choose one to play
if ( mediaItem != null )
{
musicPlayerController.nowPlayingItem = mediaItem;
}
if(musicOn == 2)
{
musicPlayerController.Pause();
playing = false;
}else
{
playing = true;
}
}
void Update ()
{
if(Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
{
Vector2 hit = Input.GetTouch(0).position;
if(!playing)
{
if(play.HitTest(hit))
{
musicPlayerController.Play();
playing = true;
pause.gameObject.SetActive(true);
play.gameObject.SetActive(false);
}
}else
{
if(pause.HitTest(hit))
{
musicPlayerController.Pause();
playing = false;
play.gameObject.SetActive(true);
pause.gameObject.SetActive(false);
}
}
if(next.HitTest(hit))
{
MPMediaQuery query = new MPMediaQuery();
object[] items = query.items;
mediaItem = (MPMediaItem)items[Random.Range(0, items.Length)]; // randomly choose one to play
if ( mediaItem != null )
{
musicPlayerController.nowPlayingItem = mediaItem;
}
}
}
}
so that’s all i use. well i have imported all the stuff from you package in my project as I plan on using other content in future. And I kind of don’t have the comment button on here so I can’t answer a second time here, except if somebody makes this post a comment