public static void UploadAssets(Package package, string newGUID, string newRootPath, string newProjectpath, string filepath, AssetStoreAPI.DoneCallback callback, AssetStoreClient.ProgressCallback progress) { string path = string.Format("/package/{0}/unitypackage", package.versionId); AssetStoreClient.UploadLargeFile(path, filepath, new Dictionary <string, string> { { "root_guid", newGUID }, { "root_path", newRootPath }, { "project_path", newProjectpath } }, delegate(AssetStoreResponse resp) { if (resp.HttpStatusCode == -2) { callback("aborted"); return; } string errorMessage = null; JSONValue jsonvalue; AssetStoreAPI.Parse(resp, out errorMessage, out jsonvalue); callback(errorMessage); }, progress); }
public static void UploadBundle(string path, string filepath, AssetStoreAPI.UploadBundleCallback callback, AssetStoreClient.ProgressCallback progress) { AssetStoreClient.UploadLargeFile(path, filepath, null, delegate(AssetStoreResponse resp) { string errorMessage = null; JSONValue jsonvalue; AssetStoreAPI.Parse(resp, out errorMessage, out jsonvalue); callback(filepath, errorMessage); }, progress); }