10-16-2016 03:57 AM
10-16-2016 07:03 AM
12-03-2016 09:17 PM
charles.beyer said:
Cloud storage was designed to holder larger chunks of data, like a game save. Nothing prevents you from storing smaller things, but then you have to worry about performance and consistency issues. Consistency meaning, you have to be careful that all values are synchronized between all devices before using them. So if you can serialize your stats to one structure to save, that would be better. There is not a good Unity sample yet beyond demonstrating the API calls in Samples/UnitySample/PlatformSample. There is a native sample that demonstrates all the complexity of cloud storage and conflict resolution in Samples/CloudStorageExample. Hopefully we can add a more complete Unity sample when Android support is finished.
12-04-2016 01:08 AM
12-23-2016 06:58 PM
private void GetLoggedInUserCallback (Message msg)
{
if (!msg.IsError) {
m_OVRuser = msg.GetUser ();
m_
PlayerID
= m_OVRuser.OculusID;
}
}
void doSaveLocalPlayerInfo ()
{
if (m_OVRuser != null) {
string AvatarName = "myAvatarName";
byte[] avatarNameBytes = new byte[100];
avatarNameBytes = System.Text.Encoding.ASCII.GetBytes (AvatarName);
//Saving an entry with a key prefixed by the playerID. EG playerID_AvatarName
CloudStorage.Save ("PlayerInfo", (m_PlayerID + "_AvatarName"), avatarNameBytes, 100, "");
}
}
void doLoadLocalPlayerInfo ()
{
if (m_OVRuser != null) {
string PlayerID = m_localPlayerName;
byte[] avatarNameBytes = new byte[100];
// HOW DO I CAPTURE THIS DATA??? SOMEHOW INTERCEPTING A REQUEST ??//
avatarNameBytes =
CloudStorage.Load ("PlayerInfo", (PlayerID + "_AvatarName"));
m_localPlayerAvatarName = System.Text.Encoding.ASCII.GetString (avatarNameBytes);
}
}
12-26-2016 03:23 PM
CloudStorage.Load ("PlayerInfo", (PlayerID + "_AvatarName"))
.OnComplete(delegate(Message<CloudStorageData> message) {
if (message.IsError) {
Debug.Error("CloudStorage.Load error: " + message.GetError().Message);
return;
}
m_localPlayerAvatarName = System.Text.Encoding.ASCII.GetString (message.GetCloudStorageData().Data);
});
12-27-2016 12:14 AM
12-29-2016 06:55 PM
01-03-2017 09:10 AM
05-08-2018 07:26 AM