Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: Alex Chouls on February 02, 2015, 05:01:11 PM

Title: Fixing IL2CPP linking errors[SOLVED]
Post by: Alex Chouls on February 02, 2015, 05:01:11 PM
Apparently IL2CPP for iOS does not support Unity Networking yet. To build a project with Playmaker:


If you use networking in your project you will have to wait for Unity to support it in IL2CPP for iOS!
Title: Re: Fixing IL2CPP linking errors
Post by: Alex Chouls on February 03, 2015, 12:59:32 PM
Also please check these threads on the Unity forum if you're having problems with IL2CPP and iOS:

http://forum.unity3d.com/threads/4-6-ios-64-bit-beta.290551/
http://forum.unity3d.com/threads/official-the-collected-il2cpp-forum-topic.247039/
Title: Re: Fixing IL2CPP linking errors
Post by: XilenceX on February 04, 2015, 06:01:54 PM
I followed all the instructions to the letter and this got rid of the linker errors!
Sadly my GUI that's based on the new Unity canvas system is also gone now. ;(
And XCode throws errors at me while the game runs that lots of scripts are missing. Does this have anything to do with this "fix"? The GUI worked fine before I switched to IL2CPP.

The errors all look like this:
"A script behaviour has a different serialization layout when loading. (Read 24 bytes but expected 84 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
 
(Filename:  Line: 1170)

The referenced script on this Behaviour is missing!
 
(Filename:  Line: 1608)

A script behaviour has a different serialization layout when loading. (Read 24 bytes but expected 104 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
 
(Filename:  Line: 1170)

"

EDIT: this is probably not a problem with Playmaker since others are getting the same errors when using the new GUI system.
Title: Re: Fixing IL2CPP linking errors
Post by: LAB618 on February 05, 2015, 05:05:33 PM
Hi Alex,

I followed your instructions, and Xcode now builds my project without the original errors, but when it starts running on the device it shows up the following errors and can't load the next scene:

ArgumentException: Set Method not found for 'active'
  at System.IO.MonoIO.GetFileType (IntPtr handle, MonoIOError& error) [0x00000] in <filename unknown>:0
  at System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object value, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  at System.Reflection.StrongNameKeyPair.System.Runtime.Serialization.ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo info, StreamingContext context) [0x00000] in <filename unknown>:0
  at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value, System.Object[] index) [0x00000] in <filename unknown>:0
  at PlayMakerTriggerStay..ctor () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.ReflectionUtils.SetMemberValue (System.Reflection.MemberInfo member, System.Object target, System.Object value) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.ReflectionUtils.SetMemberValue (System.Reflection.MemberInfo[] memberInfo, System.Object target, System.Object value) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.FsmProperty.SetValue () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Actions.SetProperty.OnEnter () [0x00000] in <filename unknown>:0
  at SA_ScreenShotMaker+<SaveScreenshot>c__Iterator5.Reset () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.FsmState.OnEnter () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.UpdateStateChanges () [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
  at Replacements.Attribute.CheckParameters (System.Object element, System.Type attributeType) [0x00000] in <filename unknown>:0
Replacements.Attribute:CheckParameters(Object, Type)
 
(Filename: currently not available on il2cpp Line: -1)

Any idea what's wrong, and how to fix it?

Cheers
Steve
Title: Re: Fixing IL2CPP linking errors
Post by: Alex Chouls on February 05, 2015, 05:29:08 PM
@LAB618 From the error, it looks like you're trying to use the SetProperty action to set a GameObject's active property which is depreciated since Unity 3.5. You should use the Activate Game Object action instead. If you right click Set Property in the Action Browser you can find where it's used...

@XilenceX This doesn't sound like anything that would be effected by the networking fix. IL2CPP support is still very new and Unity is still working out some kinks...
Title: Re: Fixing IL2CPP linking errors
Post by: LAB618 on February 05, 2015, 05:33:15 PM
Thanks Alex,

I'm new to Unity and Playmaker, so didn't realise the active property had been deprecated. I use it quite a bit, so will now go through my project and change it.

Cheers
Steve
Title: Re: Fixing IL2CPP linking errors
Post by: meaphly on April 23, 2015, 08:42:00 PM
From the Output Xcode is giving me, I witness an unmitigated disaster. Is this gonna get fixed by any side?
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on April 24, 2015, 12:47:59 AM
Hi,

 I can publish to IOS with IL2cpp. What is the error you get in xCode?

It's likely that third party assets needs updating or are not yet compatible, but I can publish a project using PlayMaker. Make sure for example that you have stripping disabled ( and run the latest PlayMaker and Unity versions)

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: meaphly on April 24, 2015, 07:52:17 AM
I can publish too but apart a menu scene the rest do not work properly. The magnitude of this is big in the project. Stripping is disabled. If you have anything that I could have ignored when using IL2CPP please tell me.
For the record I use "Set Property" a lot since that is why I mainly use Playmaker. Tell me if I have to do everything using scripting or another plugin.
I handle from Camera Shaders' float values to Wheel Colliders on the fly and UI position elements. As far as it concerns activation of objects I use "Activate" action only, "Enable" property (set property: enabled, boolean) on components (objects) of game objects.

I get a lot of

(Filename: currently not available on il2cpp Line: -1)

and a lot of

(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
 at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on April 24, 2015, 08:19:22 AM
Hi,

 This is still *likely* something happening within Unity, not PlayMaker, because the root of the cause is still the RPC method from Unity that doesn't compile properly.

http://forum.unity3d.com/threads/bug-replacements-remotingservices-createclientproxy-in-unity-5-0-1-and-xcode-6.317067/

Let me clarify, you say that you have one scene that you can publish but not others, in the SAME projects?

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: meaphly on April 24, 2015, 08:39:55 AM
I get the build done. It is running, all of it. But the behavior is erroneous. Trigger Events happening on their own (this happened after I updated to the latest Playmaker today, I had the first version that came to support Unity 5 didn't happen before), and more things. The main menu only seems to be working properly, meaning as expected even though the output is going crazy. If you check above I edited my previous reply with some info.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on April 24, 2015, 09:22:50 AM
Hi,

 ok, this will need to be taken down piece by piece. Can you check that PlayMaker itself has no errors in the PlayMaker editor ( different from Unity own console and errors). Check this when playing in editor.

 then make a web build or  desktop build, if it behaves ok or not.

-- what kind of custom actions are you using? this is important, for examepl you mention trigger events. How do you work with trigger events, is it by listening for global system events, or using actions?


Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: meaphly on April 24, 2015, 10:14:21 AM
Ok so I built for armv7 using Mono works wonders, Android works wonders. Using IL2CPP I get what I already mentioned. My custom actions are some Game Data Editor that work fine no matter where I try. The trigger event I mentioned is a simple On Trigger Enter (Trigger Collider) event. I also have "EVERYPLAY_IPHONE;GDE_PLAYMAKER_SUPPORT" scripting define symbols. On Editor or any other platform I tried I get no errors or erroneous behavior. I wanted to pinpoint the cause but there is no "one cause". The things don't fit I am afraid. It is wide spectrum. I will drink some coffee forget about it for some time and then get back to it :)
Watching 2 months of non-stop work not behaving on a platform is never encouraging.
Even the Set Property for unity engine sprite renderer set sprite doesn't work.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on April 27, 2015, 02:55:09 AM
Hi,

 You should not use SetProperty when targeting iPhone, some work some doesn't, I never could make sense of the rule for this. I removed all SetProperties and built custom actions for each one of them, and all problems where gone from that front, that was before IL2CPP, but I we stick to this.

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: meaphly on May 01, 2015, 04:12:54 AM
I made a custom action that simply calls some functions I want... I don't use the action... and here I got mindfucked: Any Set Property action I have that calls the same function miraculously works and the output leaves it out... dafuq? for me it is a win win. I think you should try this. I am so thankful for those caffeine and cigarette allnighters... so it is like adding words in a database. Strange (for me that is).
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on May 06, 2015, 10:05:16 AM
Hi,

 I am not sure I understand, but if that works for you, great!

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: meaphly on May 10, 2015, 10:24:44 AM
The "Set Property" works fine using IL2CPP just by doing that :D super happy here! Try it. It is a major ease :)
Title: Re: Fixing IL2CPP linking errors
Post by: tyb51 on May 10, 2015, 06:45:47 PM
The "Set Property" works fine using IL2CPP just by doing that :D super happy here! Try it. It is a major ease :)

Could you elaborate a bit more on what you did? An example would be very useful! I'm having the same issue, and for now I'm not focused on the iOs version of my game so rewriting all Set-actions is not really high on my to-do list? :p But if u have a more effective way of doing it, it would be very helpfull.
Title: Re: Fixing IL2CPP linking errors
Post by: meaphly on May 11, 2015, 06:19:16 AM
If you make an action that has - for example,

(add the required variables)      

         public override void OnEnter()
      {
         wheel.motorTorque = torque;
         wheel.brakeTorque = brake;
         Rect temp = cam.rect;
         temp.x = 1;
         temp.y = 1;
         temp.height = 1;
         temp.width = 1;
         cam.rect = temp;
         spriterenderer.sprite = sprite;
         gameobject.SetActive (false);
         wheel.steerAngle = steer;
         particles.enableEmission = enabled;
         canvas.renderMode = RenderMode.ScreenSpaceCamera;
         canvas.worldCamera = cam;
         Color tempA = spriterenderer.color;
         tempA.a = 1;
         spriterenderer.color = tempA;
         if (!everyFrame)
         {
            Finish();
         }
      }

You will see just by having the PlayMaker Action in the Project folder the Set Property for wheel collider motortorque works, set sprite works, set sprite alpha colour, the rect of a camera you use in your UI the particle emission
and all that just because you added those lines in a PlayMaker Action.
Make a copy of the Set Property action with a unique name and just modify it. If you have problems I will send you my own, or tell me what functionality exactly you want to add in.
Title: Re: Fixing IL2CPP linking errors
Post by: tyb51 on May 13, 2015, 06:16:50 AM
Ahhh i think I understand.
Thank you very much for the example.
As I'm going into finals l,  I can't realy tesg if i understand correctly! But I'll keep you on that offer to help me. ;D
Title: Re: Fixing IL2CPP linking errors
Post by: unclebob on May 25, 2015, 03:41:58 PM
Hi mate

sorry to ask but could you send that example. 

I have a massive deadline and like you had no idea that set property was depreciated and not working in ios.

Cheers

Peter




If you make an action that has - for example,

(add the required variables)      

         public override void OnEnter()
      {
         wheel.motorTorque = torque;
         wheel.brakeTorque = brake;
         Rect temp = cam.rect;
         temp.x = 1;
         temp.y = 1;
         temp.height = 1;
         temp.width = 1;
         cam.rect = temp;
         spriterenderer.sprite = sprite;
         gameobject.SetActive (false);
         wheel.steerAngle = steer;
         particles.enableEmission = enabled;
         canvas.renderMode = RenderMode.ScreenSpaceCamera;
         canvas.worldCamera = cam;
         Color tempA = spriterenderer.color;
         tempA.a = 1;
         spriterenderer.color = tempA;
         if (!everyFrame)
         {
            Finish();
         }
      }

You will see just by having the PlayMaker Action in the Project folder the Set Property for wheel collider motortorque works, set sprite works, set sprite alpha colour, the rect of a camera you use in your UI the particle emission
and all that just because you added those lines in a PlayMaker Action.
Make a copy of the Set Property action with a unique name and just modify it. If you have problems I will send you my own, or tell me what functionality exactly you want to add in.
Title: Re: Fixing IL2CPP linking errors
Post by: unclebob on May 25, 2015, 05:34:46 PM
Hi Jean

we use Set Properties to display text in a scene.  Essentially an empty object activated by a user action.  What would be the quickest way to replace these actions. 

Hate to ask but we have a tight tight deadline to make and have to get this on ios pronto.

Fixed almost everything else bar the odd warning but we need this functionality.

Cheers for everything

UB


Hi,

 You should not use SetProperty when targeting iPhone, some work some doesn't, I never could make sense of the rule for this. I removed all SetProperties and built custom actions for each one of them, and all problems where gone from that front, that was before IL2CPP, but I we stick to this.

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: tyb51 on June 02, 2015, 01:22:16 PM
take a look here if it's only to set the tekst (that is if you are using uGui):

http://hutonggames.com/playmakerforum/index.php?topic=8452.15
Title: Re: Fixing IL2CPP linking errors
Post by: unclebob on June 11, 2015, 04:37:46 AM
take a look here if it's only to set the tekst (that is if you are using uGui):

http://hutonggames.com/playmakerforum/index.php?topic=8452.15

Thank you, wrote our own unoptimized custom action to put text on an attached textmesh.  It works for us and have shared it for improvements.

Thanks for the pointer though

Cheers

Unclebob
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 21, 2015, 03:11:50 PM
I did these but didnt work my ipad. What is the solution do you know?
Import Assets/PlayMaker/Versions/PlayMakerNACL.unitypackage. These dlls have networking stripped out.
Delete the PlayMaker/Actions/Network folder.
Edit PlayMaker/Actions/CreateObject.cs and add UNITY_IPHONE To the #if list of platforms that don't support networking.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 22, 2015, 08:18:35 AM
Hi,

 I made several tests and indeed I made it work with the Nacl version.

The trick is to find which property fails to be accessed with "Set/get Property" action and include the class definition in the link.xml file like so:

http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html

if that doesn't work, can you explain what doesn't work exactly? Is it the same as describe in the original post?

Bye,

 Jean

Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 22, 2015, 11:26:35 AM
my some Xcode outputs

at HutongGames.PlayMaker.Actions.GetProperty.OnUpdate () [0x00000] in <filename unknown>:0
  at Mono.Security.Cryptography.PKCS8+EncryptedPrivateKeyInfo.get_IterationCount () [0x00000] in <filename unknown>:0
  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
  at System.Collections.Generic.EqualityComparer`1+DefaultComparer[System.TimeSpan].Equals (TimeSpan x, TimeSpan y) [0x00000] in <filename unknown>:0
System.Collections.Generic.DefaultComparer:Equals(TimeSpan, TimeSpan)
 
(Filename: currently not available on il2cpp Line: -1)

Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 24, 2015, 08:15:38 AM
Hi,

 It would be great if you can send me a repro case.

what are you trying to get as property, the component name and the propert, and maybe that will be enough for me to repro.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 24, 2015, 08:36:35 AM
I have a lot of set and get property actions in my game. I dont know how I can change these actions to other action. These are my example actions


(http://i.hizliresim.com/Amd9EX.jpg) (http://hizliresim.com/Amd9EX)
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 25, 2015, 08:21:01 AM
Hi,

 ok, then let's try the following:

pubish withot any stripping option and the full .net20 set ( not the sub set).

does that work then?

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 25, 2015, 10:04:16 AM
doesnt work. My settings:

symlink unity libraries =on
IL2cpp
universal
net 2.0
ios version 7.0
stripping disabled
script call opt  Fast no exceptions
static and dynamic batching on
optimize mesh data off
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 25, 2015, 11:09:13 AM
Hi,

 try slow and safe option and let me know.

if that doesn't work, then we'll have to look at each access individually and I'll run tests locally myself and move on this way.


 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 25, 2015, 04:37:49 PM
No doest work :(
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 26, 2015, 05:41:48 AM
Hi,

 ok, so let's start one step at a time.

1: Take for example one of the set or get property you us in your scene and extract JUST that.

2: Make a new scene which does JUST that, for example if it's a light intensity control, create just one light, one fsm with one state with one set property to control that light intensity ( not everyframe, just once).

3: Publish that scene only

If that doesn't work, then you'll need to use a custom in place of ALL the places you contorl light intensity using "Get/set Property".

There is unfortunatly no other way I know off, especialy if it doesn't work even with no stripping (which is odd, because it really means everything it there), so TRIPLE check that the error is really related to the usage of "Get/Set property" before refactoring, it could be simply because the light is not referenced properly and so it's null and throw an error.


Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 26, 2015, 01:07:21 PM
Hi. I sended my project package. İf you can test I would be pleased. İts a car. When press ugui buttons doesnt work on ios device. File is 2 mb I couldnt upload your forum sorry.

http://www.filedropper.com/sendhutong



Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 28, 2015, 06:31:08 PM
I created new project and add  only get and set property fsm to gui text. I changed text with get and set property. İt does work on  unity editor but I build for ios İt doesnt work.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 29, 2015, 01:54:06 AM
Hi,

 What do you mean by GUI Text? is it a component "GUIText". if that's the case, I can make it work when no stripping option is selected, else if I select the maximum stripping option, I have to included the GUIText into the link.xml

can you try the following instructions. they work for me:

The solution is:

-- Switch to PlayMaker Nacl version, which has its network support removed. Go to the PlayMaker/Versions folder and install PlaymakerNACL.unitypackage
-- Remove all networking actions (in PlayMaker/Actions/networking)


1: you have PlayMaker Nacl installed
2: you have micro mscorlib stripping selected
3: you have an GameObject with a GUITexture component
4: you have an fsm with a "Set Property" action setting a property of that GUITexture

5: create a link.xml under your "Assets/" folder with the following content:
<linker>
    <assembly fullname="UnityEngine">
        <type fullname="UnityEngine.GUITexture" preserve="all"/>
    </assembly>
</linker>


6: publish in an IOS device, and it will work, the GUITexture component will be preserved from stripping ( Unity likely bin that because it's obsolete, fair enough, but it's a good simple case), and accessing the GUITtexture using reflection ( "Set/get property" action) will now work fine.

So, in your own projects, you'll have to identify what is missing in terms of properties and fill the link.xml accordingly.

more on this here:

http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html

If you have trouble with this, let me know. It's important we provide a clear set of instructions on this case, cause a lot of members are confronted with this problem.

What version of Unity are you using? GUITexture is very limited, and I would strongly recommand you use the new Unity UI system, which will give you more possibilities and will work better in the long run. And you have all the custom actions needed to work with this from the wiki or Ecosystem.

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 29, 2015, 04:33:37 AM
I use 4.6.6. I dont use guitext but I wanted to test just to set/get property. Yes it worked with link.xml. But I didnt understand  what is link.xml?  İf its needed how I use it on my project. I am not programmer I am an artist. Thats why  I selected playmaker. Thanks for everything
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 29, 2015, 06:09:23 AM
Hi,

Ah, I am glad this works! the way to go is now to locate each component to access and simply add them to this link.xml.

there is a link to the documentation on this ( on my last post), simply read through it, even if you don't catch the "how to", it explains the concept where basically, some classes are not referenced in purposed to reduce the build size, and so the class is "stripped" or in simple terms missing in the final build. The Link.xml allows the developer to create a list of class that MUST not be stripped.

 It's unfortunate, but it's nothing PlayMaker can do about it. It's inherent to how Unity compiles and optimize its code when publishing to mobile.

however, let me work on a small tool, at least I'll mention this to Alex, where we could introspect a project and the usage of Set/Get property to at least give you a list of classes that you are accessing with this actions and so it's likely all them classes you need to add to the link.xml.

Bye,

 Jean

Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on June 29, 2015, 10:34:26 AM
Yes I read but I didnt understand  ???. I will wait your tool.I hope it will not take too long to prepare. Very thnks.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on June 30, 2015, 03:37:50 PM
Hi,

 It will take some time... I would definitly make the effort right now to manually go over your set/get properties action send me a list of the components you are accessing. then I'll produce the link.xml for you right away. ok?

Else, early next week I coudl have something helping along, but not really final...

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: escpodgames on June 30, 2015, 06:37:09 PM
Have been following this thread for a while as I will also need to fix this issue. A tool would be super great!

Will the PlayMaker Nacl allow for Photon networking?
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 01, 2015, 04:09:19 AM
Hi,

 yes, the Nacl Version only remove the built in old Unity networking support, other networking solution works.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 08, 2015, 07:54:51 AM
Hi,

 ok, I have a first basic introspection system to help you with the creation of the linker.xml.

[edit] it's now available on the Ecosystem (http://j.mp/1Esn1mF) with a video (https://youtu.be/cnCq-OPuLRE)


1: Download and install the attached Package ( a beta version of the PlayMaker utils)
2: Locate and select the "Linker Wizard" asset in your project ( at the root of the assets)
3: follow the instruction ( install the actions, which will replace GetProperty, SetProperty and MethodInvoke with the ones debugging their usage, so it's project wise with no effort)
4: make sure you checked debug to true on the linker wizard
5: run your game in Unity and check the console for all the logs
6: create the link.xml

You'll end up with a link.xml file in your assets ( you can ping and select it from the wizard)


so let me know how it goes.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on July 09, 2015, 06:42:04 AM
Very thanks. İf it creates automatically to linker.xml for me  it will be very usefull  :D
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on July 09, 2015, 07:10:11 AM
hello. My link.xml file like this.

<linker>
    <assembly fullname="UnityEngine">
        <type fullname="UnityEngine.TextMesh" preserve="all"/>
        <type fullname="UnityEngine.GameObject" preserve="all"/>
        <type fullname="UnityEngine.GUIText" preserve="all"/>
        <type fullname="UnityEngine.Rigidbody" preserve="all"/>
        <type fullname="UnityEngine.ParticleSystem" preserve="all"/>
        <type fullname="UnityEngine.Light" preserve="all"/>
        <type fullname="UnityEngine.WheelCollider" preserve="all"/>
        <type fullname="UnityEngine.AudioSource" preserve="all"/>
        <type fullname="UnityEngine.UI.Image" preserve="all"/>
       
    </assembly>
</linker>

when I press build received this error.
Assets/PlayMaker Utils/PlayMakerUtils_Assets.cs(10,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?

what is this?
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 09, 2015, 09:11:41 AM
Hi,

 Oups, can you redownload from the post attachment, I corrected it.

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on July 09, 2015, 11:28:06 AM
Oh very thnks now it works  :D
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 09, 2015, 11:48:35 AM
Hi,

 ok, so you confirm that the link.xml content that created made your game now work when running on IOS device?

 let me know, so that I can make a bold statement on this.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on July 09, 2015, 02:24:36 PM
Yes I install your package and created link.xml and it works. But net 2.0 doesnt work. I tried net 2.0 subnet and now working
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 10, 2015, 03:49:59 AM
Hi,

 are you sure it's not the opposite? that it doesn't work with a sub set but only with the full .net?

Anyway, I updated the package, now it creates/update the link.xml file at a press of a button ( in the wizard, once you ran the game and got some usage).

 Let me know how it goes :)

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: serkanos on July 10, 2015, 07:10:13 AM
With net 2.0 subset working.
Title: Re: Fixing IL2CPP linking errors
Post by: craigz on July 12, 2015, 12:53:35 AM
Hi Jean!

Thank you so much for drilling away on this :)

Question though, it sounds like there's supposed to be a link.xml file that gets automatically created? I'm seeing the set property's being debugged in the console when I play but there's nothing in the Linker Wizard to create an .xml file afterwards :/
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 15, 2015, 08:14:26 AM
Hi,

 once you play your scene AND that one of the modified actions triggers a log, you'll get this:

(http://i.imgur.com/AqGMYTo.png)

and you click on "update linker content" and it will generate the link.xml or simply update it ( it's non destructive, any link define will remain even if not caught during that session)

so in your console you should have logs coming in like:

(http://i.imgur.com/eJOwGY5.png)

can you confirm this?

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: craigz on July 16, 2015, 02:09:11 AM
I can confirm the log's showing up in the console.

But I seem to be missing what's labeled 4. and 5. on yours and the live preview...

I imported the package, then 'Installed Actions'.  :/

(http://i.imgur.com/w8KyENI.png)
(http://i.imgur.com/RP1sJbC.png)
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 16, 2015, 06:59:42 AM
Hi,

 Uhm... that's very odd. the only thing that could be is that you haven't imported the custom actions. They changes since the last package. Make sure you follow each steps, that is installing the custom actions from step 1.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: craigz on July 17, 2015, 03:13:03 AM
Hiya!

Strange right? I'm using the package from page 3 you had attached.

I did a fresh copy of the project/import of the package.

Imported the scripts from step 1, and get this if I click it again.

Thankyou for the quick responses :) is anyone else having this issue?
(http://i.imgur.com/8K1qbEz.gif)
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 17, 2015, 04:41:33 AM
Hi,

 And have you ran your scene then? and still nothing came up in the preview?

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 17, 2015, 05:47:44 AM
Hi,

 I think I know, I simply forgot to add the new action package inside the package..

can you redownload it from the original post and re do all the steps, thanks :)

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: craigz on July 20, 2015, 01:51:55 AM
Hi Jean,

Thank you for your patience and helping, it means a lot to me :)

It worked! :D  Wahoo!

Still running into some properties not working when deploying to iOS (set sprite alpha over time as float etc) but there's definitely work arounds I can do for those fringe cases :)

thank you! :D
craigz
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 20, 2015, 06:07:37 AM
Hi,

Great :)

 Also, make sure you use custom actions when available, and if not, simply make a request, and bump them if you don't get any reply, for all the default access to Unity stuff, we should cover as much as we can.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: bbkyrs on July 22, 2015, 06:42:16 PM
Hi, I just downloaded your linker wizard, but after "install" it still says "nothing to import". Please advice.

Thanks.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 23, 2015, 12:55:27 AM
Hi,

 Then it means you have everything, does that not trigger the wizard to let you update the link,xml when you play your scene?

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: bbkyrs on July 23, 2015, 01:37:07 PM
I get the same thing as craigz's screenshots. There's no button other than the "install Actions", and nothing comes up under the preview. Logs show up at console though.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 24, 2015, 02:12:38 AM
Hi,

 Ok, let me run some more tests, there is a corner case I am not dealing with it seems. the problem likely is on updating the actions, I modified the actions so that they can inform about their access, and it seems that when you import the actions from the wizard you don't get them installed properly.

Maybe reinstalling PlayMaker ( just to force a refresh on the actions) and then start from 1: on the wizard could help.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: bbkyrs on July 24, 2015, 12:48:17 PM
Tried reinstalling Playmaker, also tried reinstalling the linker wizard, still the same :(
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 27, 2015, 07:15:14 AM
Hi,

 ok, Please redownload from the original post.

 If importing the custom actions when clicking on the wizard button still says you have nothing new to import, do the following ( cause there is nothing I can do unfortunatly about this..)

- delete the following actions:
GetProperty
SetProperty
InvokeMethod

they are all three in PlayMaker/actions folder.

Then import again from the wizard inspector.

note: if you run multiple instance of Unity on your computer importing packagin gives unpredictable results as it can be fired to a different instance of Unity, so make sure you only run one Unity during that step.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: bbkyrs on July 27, 2015, 03:06:18 PM
Hi Jean,

Tried and still the same. I'll probably just wait for the next Playmaker / Unity updates, and hope things will be automatically fixed. Thanks for your help.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 28, 2015, 04:50:08 AM
Hi,

 Unfortunly, nothing is going to get fixed within Unity nor PlayMaker, it's simply the way it works that you have to use link.xml in come cases when you use reflections.

I think I know what happened, I messed up the packaging.. Can you try again :)

 Thanks for your patience.

 Bye,

 Jean

Title: Re: Fixing IL2CPP linking errors
Post by: bbkyrs on July 29, 2015, 12:29:11 PM
It worked! Thanks Jean, you are awesome :)
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on July 30, 2015, 01:39:48 AM
Hi,

 ahh, good. I'll wrap it up and make this available on the ecosystem.

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on September 10, 2015, 12:25:35 PM
Hi,

 The linker Wizard is now available (http://j.mp/1EYDjUl) on the Ecosystem (http://j.mp/1Esn1mF), with sample and video (https://www.youtube.com/watch?v=cnCq-OPuLRE&feature=youtu.be).


 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: RAWilco on September 11, 2015, 01:37:50 PM
Unfortunately it seems that I am still having issues with my project after building to iOS using IL2CPP. I've gone through my entire project using the linker wizard to update the link.xml file, but I am still experiencing the following issues:


It is almost as if my project is not recognising the link.xml file, even though it is all up to date.

I was wondering, is anyone else still having problems, despite having used the linker wizard? And could this behaviour perhaps be caused by something else entirely regarding IL2CPP?

My project worked fine on iOS when built using Mono2x, so there is definitely something going wrong after switching to IL2CPP (I just have no idea what that might be).



Just for reference, here is a copy of my link.xml file (which seems fine as far as I can see):

<?xml version="1.0" encoding="utf-8"?>
<linker>
  <assembly fullname="System">
    <namespace fullname="System.Net" preserve="all" />
    <namespace fullname="System.Net.Sockets" preserve="all" />
    <namespace fullname="System.Net.Cache" preserve="all" />
    <namespace fullname="System.Net.Mime" preserve="all" />
    <namespace fullname="System.Net.Security" preserve="all" />
    <namespace fullname="System.Net.NetworkInformation" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.ParticleSystem" preserve="all" />
    <type fullname="UnityEngine.GameObject" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine.UI">
    <type fullname="UnityEngine.UI.Text" preserve="all" />
  </assembly>
</linker>
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on September 11, 2015, 01:57:45 PM
Hi,

 ok, odd.

- I'll try and replicate accessing UI Text using set property

- UI Buttons are not related to the link.xml if you use the PlayMaker UI Proxy, so the issue is different here. Are you sure you have setup the canvas properly ( to have mobile input working ( the default setup should work).

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: RAWilco on September 11, 2015, 03:55:25 PM
That's right I am just using a default canvas for my UI. It is not particularly complex, so I'm fairly sure there aren't any conflicts going on anywhere. Plus mobile input works without any issues at all when building with Mono2x.

I've also tried building using IL2CPP from a completely fresh project using no other assets than what was supplied with the Linker Wizard sample package, and I still get the same issue. So rather than "All is good" I keep getting the question marks.
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on September 14, 2015, 03:15:37 AM
Hi,

Thanks for reporting:

few questions :
 What version of Unity are you using?
 what version of xcode?
 what device?

 Can you paste the link.xml generated?

 bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: RAWilco on September 14, 2015, 01:38:28 PM
Here are the requested details:

Unity - Version 5.1.0f3 Personal
Xcode - Version 6.4
Device - iPhone 5S and iPad 2

And my link.xml contains the following:

<?xml version="1.0" encoding="utf-8"?>
<linker>
  <assembly fullname="System">
    <namespace fullname="System.Net" preserve="all" />
    <namespace fullname="System.Net.Sockets" preserve="all" />
    <namespace fullname="System.Net.Cache" preserve="all" />
    <namespace fullname="System.Net.Mime" preserve="all" />
    <namespace fullname="System.Net.Security" preserve="all" />
    <namespace fullname="System.Net.NetworkInformation" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.ParticleSystem" preserve="all" />
    <type fullname="UnityEngine.GameObject" preserve="all" />
    <type fullname="UnityEngine.Camera" preserve="all" />
    <type fullname="UnityEngine.TextMesh" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine.UI">
    <type fullname="UnityEngine.UI.Text" preserve="all" />
  </assembly>
  <assembly fullname="PlayMaker">
    <type fullname="PlayMakerFSM" preserve="all" />
  </assembly>
</linker>
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on September 17, 2015, 01:34:19 AM
Hi,

 I am puzzled, the link.xml is not what you should get if you use the sample provided.

Can you make sure you use the scene as is from the ecosystem sample?

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: RAWilco on September 18, 2015, 11:24:24 AM
The link.xml I posted is what I got after using the linker wizard with both the sample provided and my own project scenes.

I have since deleted this version of link.xml and have made a fresh one using just the sample scene (and I got the exact same result after building).

Here it is:

<?xml version="1.0" encoding="utf-8"?>
<linker>
  <assembly fullname="System">
    <namespace fullname="System.Net" preserve="all" />
    <namespace fullname="System.Net.Sockets" preserve="all" />
    <namespace fullname="System.Net.Cache" preserve="all" />
    <namespace fullname="System.Net.Mime" preserve="all" />
    <namespace fullname="System.Net.Security" preserve="all" />
    <namespace fullname="System.Net.NetworkInformation" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.Camera" preserve="all" />
    <type fullname="UnityEngine.TextMesh" preserve="all" />
  </assembly>
  <assembly fullname="PlayMaker">
    <type fullname="PlayMakerFSM" preserve="all" />
  </assembly>
</linker>
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on September 25, 2015, 01:19:39 AM
Hi,

 try not to double post please, I replied on the other thread :)

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: braintapgames on September 25, 2015, 01:42:52 AM
Hi,

 try not to double post please, I replied on the other thread :)

 Bye,

 Jean

I deleted the post on this thread. They were two separate issues, but I repaired one part of the problem which led up to the other part in the other post. Thanks again for your help!
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on September 25, 2015, 07:12:40 AM
Hi RawWilco

I can't replicated any failure with this linker, maybe you could send me the project? mail me here: jean@hutonggames.com

Thanks,

 Jean

The link.xml I posted is what I got after using the linker wizard with both the sample provided and my own project scenes.

I have since deleted this version of link.xml and have made a fresh one using just the sample scene (and I got the exact same result after building).

Here it is:

<?xml version="1.0" encoding="utf-8"?>
<linker>
  <assembly fullname="System">
    <namespace fullname="System.Net" preserve="all" />
    <namespace fullname="System.Net.Sockets" preserve="all" />
    <namespace fullname="System.Net.Cache" preserve="all" />
    <namespace fullname="System.Net.Mime" preserve="all" />
    <namespace fullname="System.Net.Security" preserve="all" />
    <namespace fullname="System.Net.NetworkInformation" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.Camera" preserve="all" />
    <type fullname="UnityEngine.TextMesh" preserve="all" />
  </assembly>
  <assembly fullname="PlayMaker">
    <type fullname="PlayMakerFSM" preserve="all" />
  </assembly>
</linker>
Title: Re: Fixing IL2CPP linking errors
Post by: davidosullivan on December 02, 2015, 09:37:06 PM
I am not sure I understand this thread as I have not yet bought Playmaker (this thread puts me off)

Is this thread basically saying that if your target platform is iOS you cannot use Playmaker to Get or Set Properties on GameObjects or InvokeMethods in components/scripts?

That would seem to knock out all the functionality I am after if thats the case...
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on December 03, 2015, 12:55:11 AM
Hi,

You can actually. But it involves being aware of the Unity internal optimization when publishing to IOS ( and likely other platforms in the long run).

 Basically, if you are using Reflections, which is the case with the actions "get/set property", and "invoke method", then you need to tell Unity which classes you are reflecting, because Unity will not detect it when analyzing your project scripts and it can "strip" a class you use.

 this "linker" technic is not inherent to PlayMaker, it's actually something that is done on almost every project using advanced assets, but you are generally not aware of it because the publisher provides this link.xml file already prefilled.

 With PlayMaker, you'll have to maintain this list yourself, which is difficult if you don't know how to code, which is why I created this wizard so that you don't have to do this manually.

 So nothing scary, just a Unity workflow you need to be understanding when publishing to IOS.

It's "fully" documented on unity doc:

http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html

make sure you read all this page, with great attention, read it again and again until you understand wht it means, and let it sink in your brain.

if there is a concept on this doc page that you don't understand, then making use of Reflection is prone to issues when publishing.

In all cases. I don't recommand using reflections when publishing on mobile, and in general, just because I don't think it's a clean approach, it works and certainly allows non coders to get the job done, but sub optimal, it's like doing surgery and open your belly to feed yourself... just eat normally... that's how I see it :)

 So prefer using a dedicated custom actions accessing in conventional c# your classes and properties. If there is no available custom actions, make one or request one on this forum, and make sure you do a bit of search on both the forum and the Ecosystem (http://j.mp/1Esn1mF), you might lucky :)

So to summarize, it's not a problem with PlayMaker, it's a advanced "feature" or Unity that needs to be learned and assimulated to publish on mobile.

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: davidosullivan on December 03, 2015, 11:30:42 AM
Hey jeanfabre,

Thanks very much for the detailed info.

I'm a little confused though about where the 'danger' areas are. I'd have thought that any scripts/Classes that are on GameObjects in your scene would get included by Unity, is that right? So in that case the actions "get/set property", and "invoke method" should work on those without any further action needing to be taken, is that correct?

So is it the case that this is only an issue when you are reflecting methods in classes that are not MonoBehaviours and not specified as being 'used' by any Monobehaviours in the scene(s) you build?
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on December 04, 2015, 12:49:34 AM
Hi,

 It's more complicated than that.

ALL scripts that are Components (MonoBehavior) attached a GamObjects featured in a Scene defined in the list of build goes in the build. All Prefabs somehow referenced in such scene will go to.

but it doesn't mean the whole scripts goes in, that way I understand this ( cause indeed there is some black magic or actually lack of documentation on how it works for real),  is that portions of scripts are stripped if found not used, and indeed when you use Get/Set Property or other reflection based actions or scripts, these portions will not be found as being used by Unity and stripped.

So indeed, this is why there is this Unity link.xml file sitting around in your project, so that you can actually force Unity to include classes without stripping them.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: Jerry on February 05, 2016, 01:36:37 PM
Hi,

I have a problem with my linker.xml. My linker content look like this:

<linker>
  <assembly fullname="UnityEngine.UI">
    <type fullname="UnityEngine.UI.Text" preserve="all" />
    <type fullname="UnityEngine.UI.Button" preserve="all" />
    <type fullname="UnityEngine.UI.Image" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.SpriteRenderer" preserve="all" />
    <type fullname="UnityEngine.CapsuleCollider" preserve="all" />
    <type fullname="UnityEngine.Canvas" preserve="all" />
    <type fullname="UnityEngine.GameObject" preserve="all" />
    <type fullname="UnityEngine.AudioListener" preserve="all" />
    <type fullname="UnityEngine.RectTransform" preserve="all" />
    <type fullname="UnityEngine.TextMesh" preserve="all" />
    <type fullname="UnityEngine.Camera" preserve="all" />
    <type fullname="UnityEngine.GUIText" preserve="all" />
    <type fullname="UnityEngine.BoxCollider" preserve="all" />
  </assembly>
</linker>



when I make a build on xCode I get this error:

Undefined symbols for architecture arm64:
"Register_UnityEngine_GameObject_get_networkView()", referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I have to mention that I made all steps to remove problem with Unity Networking on IL2CPP:

"Import Assets/PlayMaker/Versions/PlayMakerNACL.unitypackage. These dlls have networking stripped out.
Delete the PlayMaker/Actions/Network folder.
Edit PlayMaker/Actions/CreateObject.cs and add UNITY_IPHONE To the #if list of platforms that don't support networking."


I also noticed that I don't get xCode errors when I remove this line:

   "<type fullname="UnityEngine.GameObject" preserve="all" />"

I also tried on clean demo project from Linker Wizard (downloaded from ecosystem). When I add this line I get xCode error as above.

Can you help me what should I do to to get rid of errors?

Unity- Ver. 4.6.2f1
Xcode- Ver. 7.2
Devide- iPad Air 2
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on February 15, 2016, 01:46:48 AM
Hi,

 I don't have time to test this right now, but I would remove the offending declaration ( GameObject preserve all), and see if everything is working fine in the logic.

 Also, what property are you trying to reflect on GameObject? I think we covered everything with regular actions for gameobject properties, and it's indeed the best way to go. Get and Set Property are good for accessing the odd property on a custom component, but if you can use a regular action please do.

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: gozda on May 06, 2016, 04:04:12 AM
Linker Wizard safe my life.

i got this error
(Filename: currently not available on il2cpp Line: -1)

It was project moved from u4.6 to 5.3.3

Big Thanks!
Title: Re: Fixing IL2CPP linking errors
Post by: indeed on July 30, 2016, 01:10:00 PM
Hi I ran the Wizard which works for some things, but I'm having an issue where it seems to be ignoring Set Property when controlling an Ellipsoid Particle Emitter's "emit" active state and building for iOS. The Wizard correctly added:

<type fullname="UnityEngine.EllipsoidParticleEmitter" preserve="all" />

to the XML so I'm not sure why it's not working. I also tried building it without stripping active. It still doesn't work. However everything works great in the editor and fine on iOS in Mono2x. Any idea?
Title: Re: Fixing IL2CPP linking errors[SOLVED]
Post by: indeed on July 30, 2016, 05:55:39 PM
Hey Jean, I found a solution to this. I'm not a coder so I don't know why it works, but it does. On this page: https://docs.unity3d.com/ScriptReference/EllipsoidParticleEmitter.html
I saw that it said "Inherits from: ParticleEmitter". I don't really know what that means, but just to see what happened I added this line to the XML:

    <type fullname="UnityEngine.ParticleEmitter" preserve="all" />

The Wizard had only added this line:
<type fullname="UnityEngine.EllipsoidParticleEmitter" preserve="all" />

And now the Set Property actions work for that emitter in IL2CPP on iOS


Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on August 02, 2016, 04:33:20 AM
Hi,

 ok, thanks for debugging this one out. There are some weird stuff with class referencing in some part of the Unity api... so I had to hardcode some of them already.

This case will be added in the next update of the Wizard

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on August 04, 2016, 04:55:47 AM
Hi,

Can you make a screenshot of your action using the ellipsoid particle? I am trying to use SetProperty, but it only picks up the Particule Emittor not the ellipsoid version.

What version of Unity are you using?

 Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: jeanfabre on August 04, 2016, 05:43:29 AM
Hi,

 Ok, I got it, it's only an issue on 4.7, and I guess you are on 5x

Can you test this package and tell me if things works now, you should have now both the class and its derived class.

You'll need the latest version of PlayMaker as well, since I also updated the modified actions to use the latest official versions from 1.8


Code: [Select]
<linker>
  <assembly fullname="UnityEngine">
    <type fullname="UnityEngine.ParticleEmitter" preserve="all" />
    <type fullname="UnityEngine.EllipsoidParticleEmitter" preserve="all" />
  </assembly>
</linker>

The package is available on the Ecosystem (http://j.mp/PlayMakerEcosystem).

 Thanks,

 Jean
Title: Re: Fixing IL2CPP linking errors
Post by: Yugandhar on March 09, 2017, 02:28:10 AM
Excellent solution. It saves our R&D time. Working great. Thanks!!
Title: Re: Fixing IL2CPP linking errors[SOLVED]
Post by: dev08 on July 13, 2020, 03:47:09 AM
Hi guys,

I'm having issues with stripping with Unity 2019.4.3f1 on ios.

The code stripping level is set to Medium.

Here is a portion of XCode console output.
Code: [Select]
MissingMethodException: Default constructor not found for type HutongGames.PlayMaker.Actions.MissingAction
  at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0
  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0

link.xml files ued by Unity when building the code.

Code: [Select]
<linker>
  <assembly fullname="mscorlib">
    <namespace fullname="System.Security.Cryptography" preserve="all" />
  </assembly>
  <assembly fullname="System">
    <namespace fullname="System.Configuration" preserve="all" />
    <namespace fullname="System.ComponentModel" preserve="all" />
    <namespace fullname="System.Net.Configuration" preserve="all" />
  </assembly>
  <assembly fullname="UnityEngine">
    <namespace fullname="UnityEngine.RectTransform" preserve="all" />
  </assembly>
  <assembly fullname="ConditionalExpression">
    <type fullname="PlayMaker.ConditionalExpression.ConditionalExpression" preserve="all" />
  </assembly>
  <assembly fullname="PlayMaker">
    <type fullname="PlayMakerFSM" preserve="all" />
  </assembly>
</linker>

FSM State that causes this issue attached below.

Thanks in advance.

Title: Re: Fixing IL2CPP linking errors[SOLVED]
Post by: jeanfabre on July 14, 2020, 02:36:39 AM
Hi,

 that's very odd, first time I see this error.

Do you get this only when stripping is set to medium?

Bye,

 Jean
Title: Re: Fixing IL2CPP linking errors[SOLVED]
Post by: dev08 on July 14, 2020, 03:32:14 AM
nope, it happens with High as well, only when stripping is low it works as expected.
Title: Re: Fixing IL2CPP linking errors[SOLVED]
Post by: jeanfabre on July 15, 2020, 02:44:37 AM
Hi,

 something is odd here, MissingAction should not be required to begin with, it's something used during editing when a missing action is detected.

 Do you have errors in the playmaker editor?  Is it saying that you are missing some actions? if yes, fix that first ( clean up or import the missing actions) and try again.

Let me know how it goes,

Bye,

 Jean