unity-sdk icon indicating copy to clipboard operation
unity-sdk copied to clipboard

"UWP" apps (for Hololens) are not supported

Open ronjkarr opened this issue 10 years ago • 30 comments

Creating a Unity app for the Microsoft Hololens requires the "Windows Store" platform, along with the "Universal 10" SDK (UWP). However, the UWP is a subset of the full .Net api -- the UWP api does not support old .Net apis. The Watson Unity SDK uses archaic APIs which generates many build errors when trying to build a Hololens app. For example, the SDK uses the old BeginRead, BeginWrite, etc. apis for async operations instead of the newer .Net async model. Also, the old SerializationInfo class is not supported in UWP.

Please modify the SDK to use apis supported by UWP.

ronjkarr avatar Nov 21 '16 17:11 ronjkarr

Are you trying to use any particular services? We have a Watson .NET SDK written in .NET Platform Standard partially completed.

mediumTaj avatar Nov 21 '16 19:11 mediumTaj

I'm starting with SpeechToText, but expect to use others as well. Thanks

ronjkarr avatar Nov 21 '16 21:11 ronjkarr

Pointed to .NET Standard SDK to try. Closing for now.

mediumTaj avatar Nov 30 '16 20:11 mediumTaj

I am still running into the same problems as ronjkarr. I wish to use TTS from the Watson SDK, it works flawlessly in editor but I can't compile. I worked my way around build errors from WebsocketSharp by compiling it into a DLL and using that instead of the loose files.

Sadly I wasn't able to do the same for the entire Watson Unity SDK. How to fix building for UWP/HoloLens?

FricoRico avatar Jan 03 '17 13:01 FricoRico

Hi @FricoRico, Because of different .NET versions, the Watson Unity SDK does not support .NET development. We are developing a .NET Standard SDK that you should be able to use. It is still in development stage and will move to the Watson Developer Cloud eventually but you can give it a try here:

https://github.com/atilatosta/dotnet-standard-sdk/tree/development

mediumTaj avatar Jan 03 '17 15:01 mediumTaj

@mediumTaj I'd like to use Visual Recognition in Unity in combination with the HoloLens. Would you suggest waiting for the feature to appear in the new .NET Standard SDK or am I better off writing my own implementation for that API? I only need to subit images and retrieve the results from Watson, nothing more.

DenzoNL avatar Feb 16 '17 08:02 DenzoNL

@DenzoNL : @eusebiu has a pull request submitted updating some third party plugins and ifdef'ing some AOT code. Can you please try it out? Let me know how it goes!

https://github.com/eusebiu/unity-sdk/tree/WSA_Support

mediumTaj avatar Feb 16 '17 15:02 mediumTaj

Hi, Can you please update on whether the above pull request worked? Alternatively is there any other way by which I can use IBM Watson in my Windows Store App?

gandhirushabh2311 avatar Aug 16 '17 08:08 gandhirushabh2311

Currently the branch is being refactored. You can follow the progress in the feature-config-refactor branch. This will be a major release and will remove higher level widget functionality. It looks like all of the changes in the wsa branch were updating 3rd party plugins. Can you try this branch out? Additionally, follow the instructions eusebiu wrote in his branch

+In order to build the player for Holographic applications, you have to change the Scripting backend (in File->Build Settings->Player settings) to IL2CPP.

mediumTaj avatar Aug 16 '17 14:08 mediumTaj

Unfortunately I can no longer test this as I don't have access to the HoloLens any more.

DenzoNL avatar Aug 16 '17 16:08 DenzoNL

I would more than be happy to try to get my HoloLens up and run tomorrow (Its at work and I'm in Norway timezone) Can I then make a unity 2017 project download the zip file from https://github.com/eusebiu/unity-sdk/tree/WSA_Support, unzip and extract import in unity and rename to Watson and then import the Holotoolkit (just recently being renamed mixed reality toolkit) and try to make a uwp project from this??? Is it other considerations I should take. Been fiddling with Watson into HoloLens for some time now without huge success I'm afraid. Would be great to finally get the thing to work .

HaraldHeide avatar Aug 16 '17 16:08 HaraldHeide

Thank you @HaraldHeide . Can you also try the hololens with the feature-config-refactor branch on this repo as well?

mediumTaj avatar Aug 16 '17 17:08 mediumTaj

DUe to other things at work i had to postpone until newxtweek with further testing I'm afraid sorry

HaraldHeide avatar Aug 17 '17 08:08 HaraldHeide

What has happened with .NET support for Watson Unity sdk since the last post? I am having issues with building projects with hololens toolkit without using .NET scripting backend.

jsmith09 avatar Oct 16 '17 17:10 jsmith09

@jsmith09 There is a PR open for this. I'm still trying to find some time this week to review it. Can you pull this version down and try it out? Please let me know what you think.

mediumTaj avatar Oct 16 '17 18:10 mediumTaj

Do you have instructions to make a unity package of this version?

jsmith09 avatar Oct 16 '17 18:10 jsmith09

@jsmith09 You should be able to download the repository and add it to your Assets directory in your project.

mediumTaj avatar Oct 16 '17 19:10 mediumTaj

image @mediumTaj I tried to build it with .NET and got these build errors.

jsmith09 avatar Oct 25 '17 15:10 jsmith09

@jsmith09 Can you please @kimberlysiva 's fork? She has a PR submitted but I haven't had a chance to try it out yet.

https://github.com/watson-developer-cloud/unity-sdk/pull/256

mediumTaj avatar Oct 25 '17 16:10 mediumTaj

@jsmith09 It looks like you have the Unity Speech-To-Text sample in the project? That's where those errors are coming from. Their sample probably isn't going to compile for Hololens.

https://bitbucket.org/Unity-Technologies/speech-to-text

kimberlysiva avatar Oct 25 '17 16:10 kimberlysiva