// Token: 0x0600537D RID: 21373 RVA: 0x001CCDFC File Offset: 0x001CB1FC private static object DeserializeApiWorld(byte[] bytes) { ApiWorld apiWorld = new ApiWorld(); apiWorld.Init(); int num = 0; short num2 = 0; Protocol.Deserialize(out num2, bytes, ref num); apiWorld.id = Encoding.UTF8.GetString(bytes, num, (int)num2); num += (int)num2; Protocol.Deserialize(out num2, bytes, ref num); apiWorld.assetUrl = Encoding.UTF8.GetString(bytes, num, (int)num2); num += (int)num2; Protocol.Deserialize(out num2, bytes, ref num); apiWorld.pluginUrl = Encoding.UTF8.GetString(bytes, num, (int)num2); num += (int)num2; if (apiWorld.pluginUrl == "-") { apiWorld.pluginUrl = null; } int version = 0; Protocol.Deserialize(out version, bytes, ref num); apiWorld.version = version; return(apiWorld); }
protected override IEnumerator CreateBlueprint() { yield return(StartCoroutine(UpdateImage(isUpdate ? worldRecord.imageUrl : "", GetFriendlyWorldFileName("Image")))); SetUploadProgress("Saving Blueprint to user", "Almost finished!!", 0.0f); ApiWorld world = new ApiWorld(); world.Init( pipelineManager.user, blueprintName.text, cloudFrontImageUrl, cloudFrontAssetUrl, blueprintDescription.text, (releasePublic.isOn) ? ("public") : ("private"), System.Convert.ToInt16(worldCapacity.text), BuildTags(), 0, cloudFrontPluginUrl, cloudFrontUnityPackageUrl ); world.id = pipelineManager.blueprintId; if (APIUser.CurrentUser.developerType > APIUser.DeveloperType.None) { world.isCurated = contentFeatured.isOn || contentSDKExample.isOn; } else { world.isCurated = false; } bool doneUploading = false; world.SaveAndAddToUser(false, delegate(ApiModel model) { ApiWorld savedBP = (ApiWorld)model; // pipelineManager.blueprintId = savedBP.id; UnityEditor.EditorPrefs.SetString("blueprintID-" + pipelineManager.GetInstanceID().ToString(), savedBP.id); Debug.Log("Setting blueprintID on pipeline manager and editor prefs"); AnalyticsSDK.WorldUploaded(model, false); doneUploading = true; }, delegate(string error) { Debug.LogError(error); doneUploading = true; }); while (!doneUploading) { yield return(null); } }
IEnumerator CreateBlueprint() { yield return(StartCoroutine(UploadImage())); SetUploadProgress("Saving Blueprint to user", "Almost finished!!", 0.0f); ApiWorld world = ScriptableObject.CreateInstance <ApiWorld>(); world.Init( pipelineManager.user, blueprintName.text, cloudFrontImageUrl, cloudFrontAssetUrl, blueprintDescription.text, (releasePublic.isOn) ? ("public") : ("private"), System.Convert.ToInt16(worldCapacity.text), BuildTags(), 0, cloudFrontPluginUrl, cloudFrontUnityPackageUrl ); if (APIUser.CurrentUser.developerType == APIUser.DeveloperType.Internal) { world.isCurated = contentFeatured.isOn || contentSDKExample.isOn; } else { world.isCurated = false; } bool doneUploading = false; world.SaveAndAddToUser(delegate(ApiModel model) { ApiWorld savedBP = (ApiWorld)model; pipelineManager.blueprintId = savedBP.id; pipelineManager.assetBundleUnityVersion = Application.unityVersion; UnityEditor.EditorPrefs.SetString("blueprintID-" + pipelineManager.GetInstanceID().ToString(), savedBP.id); Debug.Log("Setting blueprintID on pipeline manager and editor prefs"); doneUploading = true; }); while (!doneUploading) { yield return(null); } }