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 void CopyAvatarSceneAndBuildPlugin()
 {
     EditorPrefs.DeleteKey("pluginNamespace");
     if (CustomScriptsAvailable())
     {
         EditorAssemblies.AddOnAssemblyReloadCallback("CustomDLLMaker", "SwapScripts");
         CreateNewSceneWithSelectedGameObject();
         BuildAndLoadPlugin();
         AssetDatabase.Refresh();
     }
 }
Beispiel #3
0
 public static void PrepareSceneForExport(string customNamespace = null)
 {
     EditorPrefs.DeleteKey("pluginNamespace");
     if (CustomScriptsAvailable())
     {
         CopyAndOpenCurrentScene();
         BuildAndLoadPlugin(recompileCurrentPlugin: false, customNamespace);
         AssetDatabase.Refresh();
         EditorAssemblies.AddOnAssemblyReloadCallback("CustomDLLMaker", "SwapScripts");
     }
 }
Beispiel #4
0
 public static void FinishExportCurrentSceneResourceWithPlugin()
 {
     try
     {
         ExportCurrentSceneResource();
         if (!CustomDLLMaker.Cleanup())
         {
             EditorAssemblies.AddOnAssemblyReloadCallback("CustomDLLMaker", "Cleanup");
             EditorAssemblies.ReloadAssemblies();
         }
     }
     catch (Exception ex)
     {
         Debug.LogError((object)(ex.ToString() + "\n" + ex.StackTrace));
         throw ex;
         IL_0047 :;
     }
 }
Beispiel #5
0
 public static void ExportSceneResourceAndRun(string customNamespace = null)
 {
     try
     {
         if (ExportSceneResource(customNamespace))
         {
             EditorAssemblies.AddOnAssemblyReloadCallback("VRC.AssetExporter", "RunExportedSceneResourceAndCleanupPlugin");
         }
         else
         {
             AssetExporter.RunExportedSceneResourceAndCleanupPlugin();
         }
     }
     catch (Exception ex)
     {
         AssetExporter.CleanupTmpFiles();
         EditorAssemblies.ClearAssemblyReloadCallbacks();
         throw ex;
         IL_0039 :;
     }
 }
Beispiel #6
0
 private static void ExportCurrentSceneResourceWithPlugin(string customNamespace = null)
 {
     CustomDLLMaker.PrepareSceneForExport(customNamespace);
     EditorAssemblies.AddOnAssemblyReloadCallback("VRC.AssetExporter", "FinishExportCurrentSceneResourceWithPlugin");
 }