playMaker

Author Topic: Get/SetProperty meet compile problem on iOS  (Read 3526 times)

alexlange

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Get/SetProperty meet compile problem on iOS
« on: February 03, 2014, 07:38:38 PM »
Exception:
Code: [Select]
ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-invoke) System.Reflection.MonoProperty/Getter`2<UnityEngine.Object, string>:invoke_string__this___Object (UnityEngine.Object)' while running with --aot-only.



  at System.Reflection.MonoProperty.GetterAdapterFrame[Object,String] (System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in <filename unknown>:0

  at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo member, System.Object target) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo[] memberInfo, System.Object target) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.FsmProperty.GetValue () [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Actions.GetProperty.OnUpdate () [0x00000] in /Users/alex/Unity/Test/Assets/PlayMaker/Actions/GetProperty.cs:34

  at HutongGames.PlayMaker.FsmState.OnUpdate () [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.Update () [0x00000] in <filename unknown>:0

  at PlayMakerFSM.Update () [0x00000] in <filename unknown>:0

 

(Filename: /Users/alex/Unity/Test/Assets/PlayMaker/Actions/GetProperty.cs Line: 34)


Reproduce:
1. Add a FSM to any GameObject, attach a GetProperty action to it.
2. In build settings, use iOS platform and check script debugging.
3. Switch API-Compatibility-Level to .NET 2.0 (not subset) and SDK version to DeviceSDK in Player Settings.
4. Now, build & run, we can see compile exceptions of GetProperty keep throwing in XCode. In real game, this exception will stop playMaker from whatever it should do.

Discussion:
http://hutonggames.com/playmakerforum/index.php?topic=6209.0
http://hutonggames.com/playmakerforum/index.php?topic=6026.0

Solution:
It seems the only way out is use .NET2 subset instead for now. But others assets may have to use full .NET2, then conflict comes.
« Last Edit: February 03, 2014, 07:41:25 PM by alexlange »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3627
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Get/SetProperty meet compile problem on iOS
« Reply #1 on: February 04, 2014, 10:59:56 PM »
I need to ping Unity about this. Will post an update when I have some leads...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14328
  • Official Playmaker Support
    • View Profile
Re: Get/SetProperty meet compile problem on iOS
« Reply #2 on: February 04, 2014, 11:43:32 PM »
Hi,

 I found this the other day on the topic.

http://www.reentrygames.com/unity-3d-using-extension-methods-to-solve-problems-with-generics-and-aot-on-ios/

This could be a direction to investigate.

bye,

 Jean

vivalavida

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: Get/SetProperty meet compile problem on iOS
« Reply #3 on: August 17, 2015, 04:44:04 AM »
Hi,

 I found this the other day on the topic.

http://www.reentrygames.com/unity-3d-using-extension-methods-to-solve-problems-with-generics-and-aot-on-ios/

This could be a direction to investigate.

bye,

 Jean


Hi, really sorry for posting on such an old thread, but is there any progress with this?
I have used the Get/Set Property actions way too many times to manually change each usage.
or any other alternative?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14328
  • Official Playmaker Support
    • View Profile
Re: Get/SetProperty meet compile problem on iOS
« Reply #4 on: August 17, 2015, 11:32:45 AM »
Hi,

 yes, totally, Basically you need to inform Unity about the classes you use when using Set/Get Property actions, because they use Reflections, Unity doesn't keep track of them, so you have to do this manually.

 But, I created a wizard to help you in that process:

http://hutonggames.com/playmakerforum/index.php?topic=9443.msg50405#msg50405

So with this wizard, you follow the instructions, run your game so that information is gathered, and then it creates the link.xml file automatically for you.

This wizard will go soon on the Ecosystem, just haven't had time yet.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14328
  • Official Playmaker Support
    • View Profile
Re: Get/SetProperty meet compile problem on iOS
« Reply #5 on: September 10, 2015, 09:27:36 AM »
Hi,

 it's now up and I made a video for it as well.

 Bye,

 Jean