frgaj1 Posted October 18, 2018 Share Posted October 18, 2018 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 More sharing options...
yakingkuo Posted October 19, 2018 Share Posted October 19, 2018 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 More sharing options...
frgaj1 Posted October 19, 2018 Author Share Posted October 19, 2018 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 More sharing options...
yakingkuo Posted October 22, 2018 Share Posted October 22, 2018 Hi, frgaj1: 1. May I know why you call it several times? 2. Could you please show me the C# file and let us know how you use it? Thanks. Link to comment Share on other sites More sharing options...
frgaj1 Posted October 22, 2018 Author Share Posted October 22, 2018 Here's the viveport manager file we use https://pastebin.com/2ArcyMYL I added a call to get user name at the end that triggers the issue. Link to comment Share on other sites More sharing options...
yakingkuo Posted November 1, 2018 Share Posted November 1, 2018 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 More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now