To: Mitch
i found the trouble sir, it's not memory leak..
i'm so sorry to esotericsoftware.. ๐
but i think this's still categorized as a bug.. (i think)
here's the cronology:
i developed for WP8..
when i built-and-play using my pc, there was no error listed in console.. (so i assumsed that when i built it into WP8 there won't be any trouble).
in my pc, the build is works perfectly. when i play scene 'A', no laggy at all. and then go to scene 'B' and back to scene 'A' still no laggy..
but in WP8, when i play scene 'A', no laggy at all. and then go to scene 'B' and back to scene 'A', the game is "very" laggy ๐
i checked my code when in pc version, my code is fine.. that's why i said there's memory leak in skeletonAnimation lol~ (sorry)
so i decided to print the log in runtime WP8, i was so surprised that there's error that not even listed when i built it in PC version ๐
when i enter scene A, skeletonAnimation appears..
then go to scene 'B' and back to scene 'A', skeletonAnimation is not appear..
when you go back to scene 'A' again, skeletonAnimation appers ๐ (the condition is looped like this).
here's the image:
condition 1 (enter scene, first time)
Loading Image
condition 2 (enter scene, second time)
Loading Image
=======================
that happened when i use a code to instantiate like this:
//check if unit is already called as resource or not
if(GameData.prefabUnit[(UnitConstants.xNow+1)]==null){
GameData.prefabUnit[(UnitConstants.xNow+1)] = Resources.Load("Prefab Character/"+(UnitConstants.xNow+1), typeof(GameObject)) as GameObject;
//renaming name
try{
if(int.Parse(""+GameData.prefabUnit[(UnitConstants.xNow+1)].name)!=0)
GameData.prefabUnit[(UnitConstants.xNow+1)].name =
PresetDefault.CHARACTER_PREFABS_NAME[int.Parse(""+GameData.prefabUnit[(UnitConstants.xNow+1)].name)];
}catch(System.Exception e){
e.ToString();
}
}
//instantiate from called resource
GameObject e1 = Instantiate(GameData.prefabUnit[(UnitConstants.xNow+1)],
new Vector3(parent.transform.position.x, parent.transform.position.y, parent.transform.position.z-0.02f),
Quaternion.identity) as GameObject;
e1.GetComponent<SkeletonAnimation> ().state.SetAnimation (0, "standby1", true);
GameData.calledChara.Add (e1);
===================
i think the error is happened in WP8 when i'm using Resource.Load("") to load gameObject, instead of using drag-and-drop prefab into inspector's gameObject..
now, i'm trying to change Resource.Load("") method into drag-and-drop method..
i hope this will have a good result ๐