Skip to content

Instantly share code, notes, and snippets.

@OhkuboSGMS
Created January 12, 2019 18:47
Show Gist options
  • Save OhkuboSGMS/5d05f3abd5f959316e29ac408eec58d5 to your computer and use it in GitHub Desktop.
Save OhkuboSGMS/5d05f3abd5f959316e29ac408eec58d5 to your computer and use it in GitHub Desktop.
OAuthの事前認証のためのスクリプト
using System.Collections;
public class UploadTest : UnityEngine.MonoBehaviour
{
private void Start()
{
StartCoroutine(Upload());
}
IEnumerator Upload()
{
var data = new UnityGoogleDrive.Data.File
{Name = "Test.txt", Content = System.Text.Encoding.UTF8.GetBytes("Hello Google Drive ")};
var req = UnityGoogleDrive.GoogleDriveFiles.Create(data);
print("Start Test Upload");
yield return req.Send();
print("Finish Test Upload");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment