Hey all!
Our game includes a plugin from Amazon that interfaces with some of their AWS services such as DynamoDB and S3. The problem is, it seems some of the types and namespaces they use won’t compile to a Windows 10 Universal app, including ‘TraceListener’ and ‘SystemException.’ Why does this not work? Is this a Unity-side thing or a Windows 10 issue? Might there be any workarounds for it?
Thanks,
Bryant
Hey,
these classes don’t exist in .NET which is used by Universal Windows 10 Apps, the plugins have to be compiled against .NET Core 5.0, so they can be used by Universal Windows 10 Apps.
Cheers
Ah, okay, a quick search for .NET Core found me the C# code for it. I was a little misleading about the Amazon thing being a plugin; part of it is a dll but its mostly C# files.
So, I’m trying to add the missing classes into Unity, but then I get errors saying that those classes are already defined. This makes sense, but is there any way around this? Is there, perhaps, a way to package all the missing classes into a dll that is added at build time? The only other way I can see this working is doing #if !UNITY_EDITOR && UNITY_WINRT around every single one of the missing classes.
#if !UNITY_EDITOR && UNITY_WINRT wouldn’t really do justice - you should if #if NETFX_CORE. That define means you’re compiling against .NET Core API surface.
But yes, you’ll either need to do it in every file, or compile it all to a DLL and then choose platform compatibility in plugin inspector.