protected override IEnumerator CreateBlueprint() { yield return(StartCoroutine(UpdateImage(isUpdate ? apiAvatar.imageUrl : "", GetFriendlyAvatarFileName("Image")))); ApiAvatar avatar = new ApiAvatar { id = pipelineManager.blueprintId, authorName = pipelineManager.user.displayName, authorId = pipelineManager.user.id, name = blueprintName.text, imageUrl = cloudFrontImageUrl, assetUrl = cloudFrontAssetUrl, description = blueprintDescription.text, tags = BuildTags(), unityPackageUrl = cloudFrontUnityPackageUrl, releaseStatus = sharePublic.isOn ? "public" : "private" }; bool doneUploading = false; bool wasError = false; avatar.Post( (c) => { ApiAvatar savedBP = (ApiAvatar)c.Model; pipelineManager.blueprintId = savedBP.id; UnityEditor.EditorPrefs.SetString("blueprintID-" + pipelineManager.GetInstanceID().ToString(), savedBP.id); AnalyticsSDK.AvatarUploaded(savedBP, false); doneUploading = true; }, (c) => { Debug.LogError(c.Error); SetUploadProgress("Saving Avatar", "Error saving blueprint.", 0.0f); doneUploading = true; wasError = true; }); while (!doneUploading) { yield return(null); } if (wasError) { yield return(new WaitUntil(() => UnityEditor.EditorUtility.DisplayDialog("VRChat SDK", "Error saving blueprint.", "Okay"))); } }