Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

How could I add a new third party dll into the script? Unity will say not found when build

I want to add some 3rd party dll like microsoft.json.dll (which is truly 3rd party dll) and like 'System.Data.Services.Client.dll' which is dll in GAC.
Problem I met with is, when we add any additional dll into script, unity will build break saying not found such namespace.. then I add those dll under assert folder, this time, unity can load it, but then it start reporting not able to load those assemblies that this dll depends on.

How could I make it work correctly? is there any way that I could make unity load dlls in GAC?

Answers

  • Options

    @Solluna if your dll is compatible with Unity's version of mono (I believe it is still version 2.X) then you should be able to have Unity add the necessary reference by placing a copy in the Unity Project's Asset directory as described here.

    However, if you DLL requires more current .NET or UWP support, then you will need to wrap your calls to that dll in #If statements such as

    #if !UNITY_EDITOR

    to avoid errors in the Unity editor and you will want to add the necessary reference to the UWP Visual Studio solution that Unity generates when you use the Unity Build functionality.

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

Sign In or Register to comment.