thieumao

do

Sep 17th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.11 KB | None | 0 0
  1. using UnityEngine;
  2. using Parse;
  3.  
  4. public class ParseBigFile : MonoBehaviour {
  5.  
  6.     // Use this for initialization
  7.     void Awake()
  8.     {
  9.         print("Running..");
  10.     }
  11.  
  12.     void Start() {
  13.         int soto = 1000;
  14.         for (int i = 0; i < soto; i++) {
  15.             byte[] data = System.Text.Encoding.UTF8.GetBytes("File DataUser Client " + i);
  16.             ParseFile file = new ParseFile("resume.txt", data);
  17.             //Task saveTask =
  18.             //file.SaveAsync();
  19.  
  20.             ParseObject gameScore = new ParseObject("TestBigData");
  21.             gameScore["file"] = file;
  22.             gameScore["id_facebook"] = "idfb " + i;
  23.             gameScore["score"] = i;
  24.             gameScore["level"] = i;
  25.  
  26.             gameScore.SaveAsync();
  27.  
  28.             print("i= " + i);
  29.  
  30.  
  31.         }
  32.     }
  33.  
  34.     // Update is called once per frame
  35.     void Update() {
  36.  
  37.     }
  38.  
  39.     void uploadFile() {
  40.         byte[] data = System.Text.Encoding.UTF8.GetBytes("Working at Parse is great!");
  41.         ParseFile file = new ParseFile("resume.txt", data);
  42.  
  43.         //Task saveTask =
  44.         file.SaveAsync();
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment