Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: braintapgames on September 26, 2015, 09:32:06 AM

Title: Link.xml works on Unity, but not on iOS device?
Post by: braintapgames on September 26, 2015, 09:32:06 AM
I thought I should make my own post rather than just jean's topic just in case anyone might have a solution to this issue.

Here's what's going on - I used the Linker Wizard to create a link.xml for IL2CPP. It works perfectly fine on Unity, but once I build it, all of the elements that should work do not. Things such as UI and BoxCollider2D do not seem to utilize the Set Property action the way that it should.

Does anyone possibly have a solution to this issue? Am I missing a step to implement the link.xml into the project/build? Thanks for any help that you can give.
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: Budde88 on September 26, 2015, 01:31:29 PM
I don't have any advice for you unfortunately,
but I followed the Linker Wizard tutorial and everything
works on just fine on IOS.
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: Alex Chouls on September 26, 2015, 01:48:43 PM
Can you post the generated link.xml file? Maybe there's an error in the xml.

Also check for a duplicate link.xml in the project. Maybe Unity is using the wrong file...

Are there errors in xcode when you run on iOS?
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: braintapgames on September 26, 2015, 02:52:37 PM
Can you post the generated link.xml file? Maybe there's an error in the xml.

Also check for a duplicate link.xml in the project. Maybe Unity is using the wrong file...

Are there errors in xcode when you run on iOS?

@Budde88 - I followed it exactly as well. It generated the link.xml just fine and it works on Unity. However, it doesn't work on iOS for some reason.

@Alex Chouls - There is no duplication and the only xcode errors are the same Semantic issues it had before I switched from Mono 2x to IL2CPP. Here is the link.xml:

<linker>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.SpriteRenderer" preserve="all" />
    <type fullname="UnityEngine.BoxCollider2D" preserve="all" />
    <type fullname="UnityEngine.Camera" preserve="all" />
    <type fullname="UnityEngine.GameObject" preserve="all" />
    <type fullname="UnityEngine.Canvas" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine.UI">
    <type fullname="UnityEngine.UI.Image" preserve="all" />
    <type fullname="UnityEngine.UI.Button" preserve="all" />
    <type fullname="UnityEngine.UI.Text" preserve="all" />
  </assembly>
</linker>
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: jeanfabre on September 28, 2015, 04:38:06 AM
Hi,

here you have several different types accessed, which one is not working?

 I tried the UI and it works, so if you UI access do not work, which one exactly fails and I'll try to replicate on my end.

I think Alex means do you have errors in xcode while running the app on your device?

Bye,

 Jean
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: braintapgames on September 28, 2015, 08:08:58 AM
The ones that I can tell so far that isn't working is the BoxCollider2D and the UI.Button.

When you say errors in xcode, you do mean when I make the build, correct? I only get a few warnings, but no errors. There were no errors on Xcode 6.3.2 (which I was originally using). There was an error when I tried updating to Xcode 7 (linker command failed with exit code 1) so I had to disable bitcode to make it work.

Are there general things I could also try, like using a different version of Unity and such? (about to update and see if that changes anything)
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: braintapgames on September 28, 2015, 07:48:19 PM
Upon further inspection, it seems to be only the BoxCollider2D (maybe sprite also) that isn't working. The specific function that isn't working looks like BoxCollider2D isTrigger. I also tried updating unity and Xcode, but that didn't fix it.

Is it perhaps that part of the link.xml that is the issue? Thanks again for the help.
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: jeanfabre on January 26, 2016, 08:45:17 AM
Hi,

 Ok, sorry for the delay, but I found the time to properly look at this and run all tests.

Basically, this is a bug within Unity itself, it's been reported and there is nothing we can do on our side.
so for this you will need to use custom actions.

http://forum.unity3d.com/threads/boxcollider2d-not-working-on-link-xml-after-switch-to-il2cpp.357928/


Bye,

 Jean
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: memetic arts on January 27, 2016, 01:12:26 AM
Is that true even after trying the alternate XML posted by Unity?  Just wondering . . .
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: jeanfabre on January 27, 2016, 04:02:36 AM
Hi,

 Indeed it works! that's so lame... how can we then know for sure what we need.. the whole automated process is gone now...

I'll implement an update to check for this case, but it's likely that other types could need some additional entry too...

Bye,

 Jean
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: memetic arts on January 27, 2016, 12:46:36 PM
I (we?) feel your pain, Jean.  Just know that we appreciate all of your efforts, truly! Thanks!
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: memetic arts on April 19, 2016, 09:03:21 PM
@jeanfabre, hello . . . were any updates ever made?  thx!
Title: Re: Link.xml works on Unity, but not on iOS device?
Post by: jeanfabre on April 20, 2016, 01:50:35 AM
Hi,

 Yes, that's now taken into consideration, you mean the BoxCollider2D issue right? I posted around, I seem to have missed to post on that thread :)

 Have you redownloaded the latest verison of the Linker package from the Asset store?

 Bye,

 Jean