Jump to content

Viveport GetUserName call blocks thread for half a second


frgaj1

Recommended Posts

Using the latest viveport sdk on the focus, calls to User.GetUserName take 0.25 to 0.5 seconds every time. This locks up the render thread and the view in the vive focus. I am using Unity 5.6.3.p1.

 

I'm looking into a work around by threading the call to get username's java implementation but haven't had any luck with it yet. Anyone else running into this?

Link to comment
Share on other sites

Hello: 

 

Thank you very much for letting us know your question.

May I know if you are always getting the user's name to do something? 

If yes, as you said , please use the API by antoher thread. 

And we plan to release the new non-block API on next SDK release and you will have it before end of November. 

Sorry for inconvenient. 

 

Regards.

Yaking

Link to comment
Share on other sites

We call it several times and clearly need to cache it, but even single call locks up the game for 0.5 seconds.

Are you sure it would work if I threaded it? I put the call in a new unity C# thread and it fails to file the java objects.

Link to comment
Share on other sites

  • 2 weeks later...

Hi frgaj1:

 

Sorry for late response. 

From you file, you should do :

1. Api.Init(InitStatusHandler, APP_ID); on main thread. 

2. On InitStatusHandler callback function, check the return value is successful. Then call UserStats.IsReady(IsReadyHandler);

3. On IsReadyHandler callback function,  check the return value is successful. Then call 

 Api.GetLicense(new LicenseChecker(OnLicenseCheckSuccess, OnLicenseCheckFailure), APP_ID, APP_KEY);

4. On LicenseChecker callback function, check the DRM is successful. Then create a coroutine to get the display name.
Hope it can help you to solve it. Thanks a lot. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...