Search Unity

Feedback Please make option for plugins to be copied as reference in uwp with il2cpp

Discussion in 'Windows' started by Arrovs, Oct 30, 2019.

  1. Arrovs

    Arrovs

    Joined:
    Sep 23, 2014
    Posts:
    24
    Hello Unity team.
    Using .net core libraries in editor does not work and il2cpp have convertion problems, but work in generated uwp project as reference. I realy dont like idea about making bridge scripts to interact with them and would like option to not convert them into il2cpp and not merge into default assembly. In place add option for direct copy to uwp project as reference. This would solve much of headache when working with plugins, at least with UWP platform, who knows possibly for other too.
     
    Ruberta and palex-nx like this.
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    I second that.
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    What kind of conversion problems?

    What does "as reference" mean? Unity generated C++ projects and you cannot add .NET Core assemblies as references to those.

    Could you explain what kind of headaches you're facing? Generally you shouldn't have to do with the generated VS project unless you want to embed Unity into another app.
     
  4. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    No. I seconded that request because it means not this. If I have a .net plugin as DLL file in my unity project and it fails to build with il2cpp, I want to set my platform to uwp .NET native (disable il2cpp), generate UWP .NET project, copy this plugin to project folder and add it as a reference to that .NET project.
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    The last Unity version to support using .NET instead of IL2CPP was Unity 2018.4. We don't support disabling IL2CPP anymore. While you can make a .NET project and reference built Unity bits from it (here's an example: https://github.com/TautvydasZilys/unity-uwp-il2cpp-with-csharp-project-example), Unity not using IL2CPP is out of the question at this time.

    How exactly does it fail to convert with IL2CPP? That's the real issue we should be solving.
     
  6. Arrovs

    Arrovs

    Joined:
    Sep 23, 2014
    Posts:
    24
    To Tautvydas-Zilys.
    As example, try Vungle windows SDK yourself. Il2cpp converts it, but result just not work. Seemingly It have more .Net core content than .Net standart 2 supports. But adding this SDK as reference in generated UWP project works. Of course i need to write stupid C++ bridge to interact with it in this way, and this is my mentioned headache. Generated project uses strange C++/CX which works fine with managed libraries, that you surely know yourself. And overall this post says same as my first one. Im sure that, if you can generate whole project, then you can also add references that way.
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Sure, we could add an option to copy plugins to the final project and reference them from it. Still, however, how does that help you in any way? You still would have to write the bridge-glue code in order to use it, don't you?
     
  8. Arrovs

    Arrovs

    Joined:
    Sep 23, 2014
    Posts:
    24
    Shouldnt generated c++ code use it just fine? If it is most plain c++ than most likely there will be problems, didnt thought about that before. And im still afraid from WACK binary analyzer tests with my solution i am already using. Kinda start to miss .net backend.
     
    Last edited: Nov 17, 2019
  9. Arrovs

    Arrovs

    Joined:
    Sep 23, 2014
    Posts:
    24
    Run into WACK problems. Didnt knew how to solve, so with big tinkering and thanks to your example project i switched to C# UWP project and got game in store. Possibly you could add choice for C# or C++ UWP project as more often people will want to integrate il2cpp project into C#.
    Also please try, if ARM ReversePInvoke arguments doesnt throw access violating errors in GameAssebly. Possibly that is only Windows Phone thing, but i dont have better way to check ARM behaviour currently.