any way to get user name from Oculus SDK?

I'm making a multiplayer game, and I'd like to display a user-recognizable name without making the user actually enter it in my game.

I thought OVRManager.profile.name would do it, but no such luck — that's returning an empty string for me.

Any ideas how to do this? Or must we each have an "enter name" screen in our games?

For the oculus user name, i think you are required to use Oculus Platform SDK. This requires a Platform init call and a successful passed app entitlement check ( checks whether the user owns the app )d
Than you can grab the oculus user via the following call ( which contains the username plus other stuff like a DL link to the profile picture )
Platform.Users.GetLoggedInUser()

Here's some intro guide
https://developer.oculus.com/documentation/platform/latest/concepts/book-pgsg/

requires some initial learning, but the Platform SDK opens a huge amount of social capabilities for VR...
PS: it's possible that the OVRManager.profile.name gets filled with the oculus user name after the platform init call, but that's just an assumption from my side ( i did not check )

2 Likes

Thanks. I suspect I was going to have to get into that anyway to make use of the Oculus VoIP chat features, which is also on the to-do list. But it wasn't clear to me (until now) that the Platform SDK was different from the SDK bits already accessible via OVRManager etc.

Time to roll up my sleeves and dig in!

[quote=“JoeStrout”, post:3, topic: 713296]
I suspect I was going to have to get into that anyway to make use of the Oculus VoIP chat features, which is also on the to-do list.
[/quote]
Yep, use VOIP on a project currently too, together with the new Avatar system to drive remote presence, and the mouth animation supported by the Avatar API, this is a real great base platform for shared VR experiences

1 Like

When I try to use "Platform.Users.GetLoggedInUser()" i get the error "This function requires an initialized Oculus Platform. Run Oculus.Platform.Core.[Initialize|AsyncInitialize] and try again."

(THIS WEB PAGE NO LONGER EXISTS!)

[quote=“spacefrog”, post:2, topic: 713296]
For the oculus user name, i think you are required to use Oculus Platform SDK. This requires a Platform init call and a successful passed app entitlement check ( checks whether the user owns the app )d
Than you can grab the oculus user via the following call ( which contains the username plus other stuff like a DL link to the profile picture )
Platform.Users.GetLoggedInUser()

Here’s some intro guide
https://developer.oculus.com/documentation/platform/latest/concepts/book-pgsg/

requires some initial learning, but the Platform SDK opens a huge amount of social capabilities for VR…
PS: it’s possible that the OVRManager.profile.name gets filled with the oculus user name after the platform init call, but that’s just an assumption from my side ( i did not check )
[/quote]

[quote=“spacefrog”, post:2, topic: 713296]
For the oculus user name, i think you are required to use Oculus Platform SDK. This requires a Platform init call and a successful passed app entitlement check ( checks whether the user owns the app )d
Than you can grab the oculus user via the following call ( which contains the username plus other stuff like a DL link to the profile picture )
Platform.Users.GetLoggedInUser()

Here’s some intro guide
https://developer.oculus.com/documentation/platform/latest/concepts/book-pgsg/

requires some initial learning, but the Platform SDK opens a huge amount of social capabilities for VR…
PS: it’s possible that the OVRManager.profile.name gets filled with the oculus user name after the platform init call, but that’s just an assumption from my side ( i did not check )
[/quote]

URL no longer valid.