Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
RogueElessar's avatar
RogueElessar
Honored Guest
9 years ago
Solved

[UNREAL] Leaderboard Read is not returning the expected value

Hi!

I've setup my project in Unreal 4.14 to Read and Write to Oculus Leaderboards using the "Read/Write Leaderboard Integer" BP nodes. In Unreal I don't see any issues when writing to it. On reading however, it does a successful read, but I get an int value of zero. Any suggestions where I could be going wrong?

To Note, I still haven't pushed any copy of the project to Oculus yet, and am running it locally on my system. 
  • Had to dig around for a bit, but found my culprit. Since Oculus expects 64-bit ints when reading or writing values, Unreal sends the expected values. When reading, Unreal gets the 64-bit int but when saving it in the regular 32-bit int variable, it forces it to be zero.

    Some kind of a warning here would have been appreciated ... :disappointed: 

6 Replies

Replies have been turned off for this discussion
  • This should be in the Developer forum Unreal section. I'll move the thread. Thanks.
  • Had to dig around for a bit, but found my culprit. Since Oculus expects 64-bit ints when reading or writing values, Unreal sends the expected values. When reading, Unreal gets the 64-bit int but when saving it in the regular 32-bit int variable, it forces it to be zero.

    Some kind of a warning here would have been appreciated ... :disappointed: 
  • Anonymous's avatar
    Anonymous


    Had to dig around for a bit, but found my culprit. Since Oculus expects 64-bit ints when reading or writing values, Unreal sends the expected values. When reading, Unreal gets the 64-bit int but when saving it in the regular 32-bit int variable, it forces it to be zero.

    Some kind of a warning here would have been appreciated ... :disappointed: 


    So how did you fix it exactly? Can it still be used via the normal blueprint nodes?
  • I'm a newb to this kinda stuff.  Where can I find documentation on how to implement leaderboards and achievements with unreal blueprints?
  • brian_jew's avatar
    brian_jew
    Expert Protege
    We have a fix to convert the 64-bit int back into 32-bit safely fix in our github version of UE4: github.com/Oculus-VR/UnrealEngine

    This would eventually propagate to one of UE4's releases in the future.  Thanks for finding this.

    > Where can I find documentation on how to implement leaderboards and achievements with unreal blueprints?

    We don't have much specific unreal blueprints docs since most of it is an unreal blueprint that is already documented by Epic: 
    https://docs.unrealengine.com/latest/INT/BlueprintAPI/Online/index.html