I just discovered an issue I’m getting on the iPod device that I never received before.
ExecutionEngineException: Attempting to JIT compile method 'System.Reflection.MonoProperty:GetterAdapterFrame<Image, UnityEngine.Color> (System.Reflection.MonoProperty/Getter`2<Image, UnityEngine.Color>,object)' while running with --aot-only.
System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000]
Ani+AniValue.Get ()
Ani.CreateAnimations (System.Object obj, System.Collections.Hashtable properties, Single duration, System.Collections.Hashtable options, AniType type)
Ani.Method (AniType type, System.Object obj, Single duration, System.Collections.Hashtable _properties, System.Collections.Hashtable _options)
Ani.From (System.Object obj, Single duration, System.Collections.Hashtable _properties)
xObject+<>c__CompilerGenerated5.MoveNext ()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
xObject:StartAnimation(Animate, GameObject, Object, Object)
SceneSplash:CreateBackground()
SceneSplash:OnSetup()
SceneSplash:OnSceneActivate(Callback)
GameController:ActivateScene()
GameController:smile:eactivateScene()
GameController:SceneLoaded(Scene, GameObject, SceneBase)
SceneBase:Start()
I recently updated Unity iPhone to 1.6, and went though most of my code and replaced ArrayLists with List<> objects, where appropriate. I believe I tested on the device afterward to see if there were any obvious speed improvements, and the app ran fine.
I usually work in the editor, and it wasn’t until maybe an hour ago that I tested again on the device. Now, I’m receiving the above error shortly after launch.
My code uses the AniMate script (C# version that shipped with GUIManager) from the Unify wiki, and I don’t believe I’ve changed anything in it recently. It looks like the “Attempting to JIT compile method” is occurring when I fade an Image in from black. The Image class is basically a customized GameObject that has a reference to a quad (Sprite) in the SpriteManager.
Anyhow, I have no idea what could cause this message to appear.
It’s generated by the “return propertyInfo.GetValue(obj, null);” line. Using Debug.Log(propertyInfo.ToString()) outputs, “UnityEngine.Color Color”. The object ‘obj’ is the Image object, which has a Color property.
public System.Object Get()
{
if (propertyInfo != null) return propertyInfo.GetValue(obj, null);
else return fieldInfo.GetValue(obj);
}
Again, this worked fine earlier. Something must have changed, I’m guessing.
I’m using Generics on the iPhone. I’ve enabled .NET 2.1 in the Editor → PlayerSettings. I’m building to the “iPhone OS 2.2.1”. Is that okay? I don’t need to use a newer OS version, do I?