You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* This listener is used in pair with GetSharedFileIDFromUser.
We ask backends for user data to retrieve sharedFileID */
public class SpecificUserDataListener : GlobalSpecificUserDataListener
{
public ulong sharedFileID = 0;
private Storage storage = GalaxyManager.Instance.Storage;
public override void OnSpecificUserDataUpdated(GalaxyID userID)
{
Debug.Log("User " + userID + " data received");
storage.DownloadSharedFile(sharedFileID);
}
}
And is used like this
/* Downloads a file share */
public void DownloadSharedFileFromUser(GalaxyID userID, string fileName)
{
specificUserDataListener.sharedFileID = GetSharedFileIDFromUser(userID, fileName);
try
{
GalaxyInstance.User().RequestUserData(userID);
}
catch (GalaxyInstance.Error e)
{
Debug.Log("Could not request user data for reason " + e);
}
}
Given that there is only a single instance of the listener and the sharedFileId it's searching for is set with each new request, this means the listener can only listen for and therefore download a single item at a time.
The text was updated successfully, but these errors were encountered:
The event listener is defined as follows:
And is used like this
Given that there is only a single instance of the listener and the sharedFileId it's searching for is set with each new request, this means the listener can only listen for and therefore download a single item at a time.
The text was updated successfully, but these errors were encountered: