Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: dasbin on July 20, 2015, 10:59:56 PM

Title: Platform Dependent Events action not working in IOS / IL2CPP [WORKAROUND]
Post by: dasbin on July 20, 2015, 10:59:56 PM
In the Editor, the Platform Dependent Events action works correctly and will call the appropriate event for the platform being built for (in this case, UNITY_IPHONE) or UNITY_EDITOR.

However, once I actually make a build for IOS and run either on my phone or Simulator, the event just hangs and does not pass anything at all.

I should note I am building for IL2CPP, not Mono, and using Unity 5.1.2.
Title: Re: Platform Dependent Events action not working in IOS / IL2CPP
Post by: jeanfabre on July 21, 2015, 09:14:28 AM
Hi,

 I'll run some tests, can you bump me before the end of the week?

Bye,

 Jean
Title: Re: Platform Dependent Events action not working in IOS / IL2CPP
Post by: dasbin on July 27, 2015, 10:52:19 AM
Any luck with this Jean?
Title: Re: Platform Dependent Events action not working in IOS / IL2CPP
Post by: jeanfabre on July 31, 2015, 09:51:14 AM
Hi,

 yeah, there is two issues here:

 one, UNITY_IPHONE is deprecated in favor of UNITY_IOS,

but the other issue with enum checking. It seems IL2CPP has changed the way you can check enums,

So I am currently investigating and thinking on creating a new action that will check against a string as opposed to an enum, this will be more versatile.

Bye,

 Jean
Title: Re: Platform Dependent Events action not working in IOS / IL2CPP
Post by: jeanfabre on August 03, 2015, 03:36:40 PM
Hi,

 ok, I found the bug, and I reported it, hopefully this is something fixable, the problem is having an array of enums. I tested it in all possible forms, and could not get it to work, so I created a new action doing the same thing but for only one pre processor at a time.

It's on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181), and the action is called PlatformDependentEvent (https://github.com/jeanfabre/PlayMakerCustomActions_U3/blob/master/Assets/PlayMaker%20Custom%20Actions/Application/PlatformDependentEvent.cs)

Both actions features the new addition of pre processor options so now you have all the new platforms and version of Unity up to dates.

 So, for now, avoid using the PlatformDependentEvents (with s at the end), it won't work on IOS IL2CPP.

 Bye,

 Jean