Unity 3D Photon DotNet client 64bit support

edited June 2015 in DotNet

Because of recent Apple's submission requirements about 64bit compatible apps my old dotnet client dll cannot be built when trying to compile using IL2CPP backend in Unity 4.6.6. Is there any plans to release 64bit support for dotnet client for unity?

Thank You very much for info


  • I am not sure why fails to export but we plan to release an update to our Unity SDK within 2 weeks or so. Our internally used library exports fine to iOS 64bit.
    If that would hold you back, I could possibly give you a version without SDK, too.

    Also, IL2CPP is still undergoing heavy modifications. It might be an issue with a specific Unity version as well. I could guess, if you let me know what error you get.
  • My player settings are:
    Backend: IL2CPP
    Architecture: universal
    APi compatibility: .Net 2.0 (due to usage of mutexes it can't use subset)

    Stripping level: strip bytecode (though it was disabled all the time i've switched to this because of tip on Your site)

    and during posprocessing in build i get this error:
    Failed running /Applications/Unity_466/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/Perforce/project/Temp/StagingArea/Data/Managed" -l none -c link -x "/Applications/Unity_466/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f "/Applications/Unity_466/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x "/Users/Perforce/project/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/Perforce/project/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/Perforce/project/Assets/link.xml" -d "/Users/Perforce/project/Temp/StagingArea/Data/Managed" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/Npgsql.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/Photon3Unity3D.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/P31RestKit.dll" -a  "/Users/Perforce/project/Temp/StagingArea/Data/Managed/LinqTools.dll"
    Fatal error in Mono CIL Linker
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'ExitGames, Culture=neutral, PublicKeyToken=null'
      at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) [0x00000] in <filename unknown>:0 
      at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, System.String assemblyName) [0x00000] in <filename unknown>:0 
      at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) [0x00000] in <filename unknown>:0 
      at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x00000] in <filename unknown>:0 
      at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
      at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
      at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0 
      at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0 
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String)
    UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)

    I've thought that's because of dll not being compatible with 64bit, but i'm not specialist in this kind of thing. I've used newest version of dotnet client from Your site, but it still happens.

    I'll be really grateful for any help on that.
  • I've asked on Unity forums and supposely i'm missing some ExitGames.dll ("Failed to resolve assembly: 'ExitGames, Culture=neutral, PublicKeyToken=null'" part). Is it possible to have something like that missing? Or should it be a unity bug? I've been using 4.6.3 unity version earlier and updated it to 4.6.6 but the error is still the same.

    Any ideas maybe?
  • Ok I've managed to fix the problem.

    The issue was with the old link.xml file that was lying in the project folder and had ExitGames assembly blacklisted for stripping. This generated this errors when compiling with IL2CPP because library was called Photon3Unity3d.dll along with Photon3Unity3d.xml where assembly name was of course Photon3Unity3d and assembly name in link.xml file was "ExitGames". This was the main case. I even forgot the project had link.xml file to avoid stripping Photon library. I've changed dll name to ExitGames and xml file to ExitGames.xml along with assembly name in it and it compiles well.

    Does stripping level affects Photon library anyhow? IL2CPP do some stripping anyway, so should I keep the link.xml file for it?
  • Sorry that you had to wait. We've been at Unite EU and I only carried a tablet these days.
    However, I doubt that I would have guessed a linker.xml file was causing this. Luckily, we never had to use those. In Stripping Level "ByteCode", Unity usually does a good job with Photon.
    I don't know the current state of IL2CP but I read that it wasn't using the stripping level at all. Also, each patch version of Unity is currently different. On works, the next won't. Unless you have to, stick with some version that works and follow Unity's proposal: Upgrade when you need a specific fix.