IL2CPP

From PowerUI
Revision as of 01:30, 13 March 2017 by 188.222.158.94 (talk) (Created page with "Platforms that use IL2CPP like WebGL and optionally mobiles need some special considerations. == Nitro Compiler == Firstly, you'll need to precompile all your Nitro and remo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Platforms that use IL2CPP like WebGL and optionally mobiles need some special considerations.

Nitro Compiler

Firstly, you'll need to precompile all your Nitro and remove the Nitro compiler by ticking both boxes in Window > PowerUI > Nitro settings because IL2CPP errors if it encounters the libraries that the compiler uses.

Code Stripping turned on? Add Preserve

If you've got code stripping turned on, you'll need to add Preserve to the static methods that your UI uses, otherwise they'll be stripped out.

You can either use [UnityEngine.Scripting.Preserve] which requires at least Unity 5.4 or [Values.Preserve] ('Just works'):

[Values.Preserve]
public static void Hello(Dom.MouseEvent e){
   
    // This method won't be stripped out by IL2CPP.
    
}