Now that we have .NET 4.6 support, i am trying to integrate the Google cloud speech API into Unity.
This library is available as a NuGet package, and with the lack of NuGet support in Unity, i had to resort to a bit of hacking:
I imported it into a visual studio project, let it download all required DLLs and them copied them off to my Unity project, but this doesn’t work (throws an exception at runtime).
My question is: should any .net 4.5 library (theoretically) be supported now with Unity? or are there any other limitations ?
There are a few limitations, but not too many. Unity doesn’t support Windows forms, for example (although I doubt this library uses that code). Most of .NET 4.5 should be available, and our goal is to make everything available that we possibly can.
Of course a number of .NET libraries implicitly assume a JIT runtime is available, so you might run into more problems on AOT platforms.
This specific error looks pretty general though, so I can’t say if there is some missing .NET support here or not. Is it possible to test the same code in a standalone application? It might be worth trying it with the .NET Framework or Mono separate from Unity. If it working in either of those cases, we likely have a bug in Unity.
I did test it using a standalone (.net 4.5) console app and it worked. In Unity, if i attached the debugger and set it to break on any exception (.net exception that is), it shows a few exceptions related to certificate handling or something similar to that (can’t recall right now).
I have a minimal project to reproduce that, if you’d like i can share it with you (should i file a bug report or just send it over to you?)
Hi liortal,
I am facing similar problem with Google Speech recognition streaming API, I am getting run time exceptions that I am unable to remove. Were you able to get your code working ?
Yes, we’ve not tracked down the cause of this issue yet. It looks like we will have proper SSL support in 2018.2 though, so I suspect that this will work then. We will re-visit the bug report soon in the 2018.2 version of Unity.