Beispiel #1
0
 private static void ExportSceneAndPrepareForUpload(string customNamespace = null)
 {
     try
     {
         if (shouldBuildUnityPackage)
         {
             AssetExporter.ExportCurrentSceneAsUnityPackage();
         }
         else
         {
             AssetExporter.CleanupUnityPackageExport();
         }
         if (ExportSceneResource(customNamespace))
         {
             if (!APIUser.get_CurrentUser().get_hasScriptingAccess() && CustomDLLMaker.CustomScriptsAvailable())
             {
                 CustomDLLMaker.ClearSavedPluginPrefs();
             }
             EditorAssemblies.AddOnAssemblyReloadCallback("CustomDLLMaker", "Cleanup");
             EditorAssemblies.AddOnAssemblyReloadCallback("VRC_SdkBuilder", "UploadLastExportedSceneBlueprint");
         }
         else
         {
             CustomDLLMaker.ClearSavedPluginPrefs();
             UploadLastExportedSceneBlueprint();
         }
     }
     catch (Exception ex)
     {
         AssetExporter.CleanupTmpFiles();
         EditorAssemblies.ClearAssemblyReloadCallbacks();
         throw ex;
         IL_0083 :;
     }
 }
Beispiel #2
0
 public static bool ExportSceneResource(string customNamespace = null)
 {
     //IL_0015: Unknown result type (might be due to invalid IL or missing references)
     //IL_004e: Unknown result type (might be due to invalid IL or missing references)
     //IL_005f: Unknown result type (might be due to invalid IL or missing references)
     PipelineManager[] array = Object.FindObjectsOfType <PipelineManager>();
     if (array.Length > 0)
     {
         PipelineManager val = array[0];
         val.contentType = 1;
         if (string.IsNullOrEmpty(val.blueprintId))
         {
             val.AssignId();
         }
         EditorPrefs.SetString("lastBuiltAssetBundleBlueprintID", val.blueprintId);
         EditorUtility.SetDirty(array[0]);
         EditorSceneManager.MarkSceneDirty(val.get_gameObject().get_scene());
         EditorSceneManager.SaveScene(val.get_gameObject().get_scene());
     }
     if (CustomDLLMaker.CustomScriptsAvailable())
     {
         ExportCurrentSceneResourceWithPlugin(customNamespace);
         return(true);
     }
     CustomDLLMaker.ClearSavedPluginPrefs();
     AssetExporter.ExportCurrentSceneResource();
     return(false);
 }
Beispiel #3
0
 public static void UploadLastExportedSceneBlueprint()
 {
     if (VerifyCredentials())
     {
         string @string = EditorPrefs.GetString("lastExternalPluginPath");
         string text    = WWW.UnEscapeURL(EditorPrefs.GetString("lastVRCPath"));
         if (string.IsNullOrEmpty(text) || (!string.IsNullOrEmpty(text) && !File.Exists(text)) || (CustomDLLMaker.CustomScriptsAvailable() && !string.IsNullOrEmpty(@string) && !File.Exists(@string)))
         {
             EditorUtility.DisplayDialog("Could not run VRChat scene", "Last built VRChat scene could not be found. Please Test/Compile Full Scene (slow).", "OK");
         }
         else
         {
             int num = 0;
             if (ValidationHelpers.CheckIfAssetBundleFileTooLarge(1, text, ref num))
             {
                 EditorUtility.DisplayDialog("Could not publish VRChat scene", ValidationHelpers.GetAssetBundleOverSizeLimitMessage(1, num), "OK");
             }
             else
             {
                 EditorPrefs.SetString("currentBuildingAssetBundlePath", text);
                 if (APIUser.get_CurrentUser().get_hasScriptingAccess() && CustomDLLMaker.CustomScriptsAvailable())
                 {
                     EditorPrefs.SetString("externalPluginPath", @string);
                 }
                 else
                 {
                     CustomDLLMaker.ClearSavedPluginPrefs();
                 }
                 if (shouldBuildUnityPackage)
                 {
                     AssetExporter.ExportCurrentSceneAsUnityPackageIfNotExist();
                 }
                 else
                 {
                     AssetExporter.CleanupUnityPackageExport();
                 }
                 AssetExporter.LaunchSceneBlueprintUploader();
             }
         }
     }
 }