Kamil Małochleb
Kamil Małochleb

Reputation: 1

Unity - Hololens2 - connecting to PortalDevice API

I have some small issues while trying to connect to Hololens2 Device Portal API.

I am using Unity 2020.3.35f1 and MRTK 2.8.2.0.

I'm trying to connect to DevicePortal API with c# script. I'm using WebRequest class. The main problem is that everytime I'm trying to get response on application that is deployed to Hololens2 device I have error "the operation has timed out". The same code works perfectly in Unity (even in remote debugging) but not in hololens2 device. I'm sure that URI is correct and all parameters inside WebRequest are correrct too. On player settings I have turned on capabilities:

Am I missing something? Anyone have a problem like that?

I have tried to change WebRequest to HttpClient but it's not working. Tried to find information about problems like that but nobody is creating apps on Hololens2.

@@@ update - looks like I cannot connect only to DevicePortal API. I can connect to any other API and this works fine.

Upvotes: 0

Views: 98

Answers (0)

Related Questions