BananaHemic / Mumble-Unity

Performant Mumble Client For Unity3D
MIT License
79 stars 30 forks source link

UWP support (not working on Hololens)? #25

Open mechpil0t opened 5 years ago

mechpil0t commented 5 years ago

This plugin does now seem to support UWP?

If I use the il2cpp scripting backend the project will build and run on Hololens (UWP) but will not connect to the mumble server. If I switch to .Net I get a lot of errors - I assume due to UWP and normal windows .Net being different.


Assets\Scripts\MumbleTCPConnection.cs(6,36): error CS0234: The type or namespace name 'X509Certificates' does not exist in the namespace 'System.Security.Cryptography' (are you missing an assembly reference?)
Assets\Scripts\MumbleTCPConnection.cs(10,14): error CS0234: The type or namespace name 'Timers' does not exist in the namespace 'System' (are you missing an assembly reference?)
Assets\Scripts\MumbleUDPConnection.cs(4,14): error CS0234: The type or namespace name 'Timers' does not exist in the namespace 'System' (are you missing an assembly reference?)
Assets\Scripts\MumbleTCPConnection.cs(146,57): error CS0246: The type or namespace name 'X509Certificate' could not be found (are you missing a using directive or an assembly reference?
```)

etc etc etc

Unity version 2018.3.0f2
BananaHemic commented 5 years ago

Not sure why those references wouldn't be found, but I've never done UWP or Hololens. Maybe try setting the api compatibility level to something higher?

mechpil0t commented 5 years ago

yeah I think its a UWP issue, it uses some different .net api than normal .net

for example I think you cannot use System.Security.Cryptography in UWP .net

I guess the mumble plugin does not work for il2cpp?

Build Settings: platform: UWP target device: Hololens architecture: x86 build type d3d sdk: 10.0.17763.0 scripting runtime version: .net 4.x backend: .net api compatibility level: 4.x

BananaHemic commented 5 years ago

It's likely just a matter of conditionally including the UWP classes instead of the standard ones as explained here If you do, I'd love to receive a PR for it