private string BuildReportBody(bool offline = false) { string text = ""; string newLine = Environment.get_NewLine(); if (offline) { text = text + this.description + newLine; } object obj = text; text = string.Concat(new object[] { obj, "Area: ", this.area, newLine }); text = text + "Frequency: " + BugReportWindow.frequencyChoices[this.frequencyIndex] + newLine; text = text + newLine + this.extra + newLine; if (offline) { text = text + this.email + newLine; } text = text + newLine + "Unity Info:" + newLine; text = text + "Unity Version: " + Application.get_unityVersion() + newLine; text = text + "Playmaker Version: " + VersionInfo.GetAssemblyInformationalVersion() + newLine; object obj2 = text; text = string.Concat(new object[] { obj2, "BuildTarget: ", EditorUserBuildSettings.get_activeBuildTarget(), newLine }); text = text + newLine + "System Info:" + newLine; text = text + "OS: " + SystemInfo.get_operatingSystem() + newLine; text = text + "Processor: " + SystemInfo.get_processorType() + newLine; object obj3 = text; text = string.Concat(new object[] { obj3, "System Memory: ", SystemInfo.get_systemMemorySize(), newLine }); return(text + "Graphics Device: " + SystemInfo.get_graphicsDeviceName() + newLine); }
private static void ExportCurrentAvatarResource(GameObject avatarResource = null) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) if (avatarResource != null) { Selection.set_activeObject(avatarResource); } vrcPath = null; if (Selection.get_activeObject() == null) { EditorUtility.DisplayDialog("Build Custom Avatar", "You must select the avatar root gameobject you want to build.", "Ok"); } else { VRC_AvatarDescriptor component = (Selection.get_activeObject() as GameObject).GetComponent <VRC_AvatarDescriptor>(); if (component == null) { EditorUtility.DisplayDialog("Build Custom Avatar", "You must place a VRC_AvatarDescriptor on the root of you custom scene", "Ok"); } else { component.unityVersion = Application.get_unityVersion(); EditorUtility.SetDirty(component); PipelineManager component2 = component.get_gameObject().GetComponent <PipelineManager>(); if (component2 != null) { component2.contentType = 0; if (string.IsNullOrEmpty(component2.blueprintId)) { component2.AssignId(); } EditorPrefs.SetString("lastBuiltAssetBundleBlueprintID", component2.blueprintId); EditorUtility.SetDirty(component2); EditorSceneManager.MarkSceneDirty(component2.get_gameObject().get_scene()); EditorSceneManager.SaveScene(component2.get_gameObject().get_scene()); GameObject val = Object.Instantiate(Selection.get_activeObject()) as GameObject; RemoveEditorOnlyElementsFromObject(val); PrefabUtility.CreatePrefab("Assets/_CustomAvatar.prefab", val); Object.DestroyImmediate(val); if (shouldBuildUnityPackage) { List <string> list = new List <string>(); list.Add("Assets/_CustomAvatar.prefab"); string dstPath = Application.get_dataPath() + "/../" + Selection.get_activeObject().get_name() + ".unitypackage"; AssetExporter.ExportCurrentAssetAsUnityPackage(list, dstPath); } else { AssetExporter.CleanupUnityPackageExport(); } AssetBundleBuild val2 = default(AssetBundleBuild); val2.assetNames = new string[1] { "Assets/_CustomAvatar.prefab" }; val2.assetBundleName = "customAvatar.unity3d"; val2.assetBundleName = val2.assetBundleName.ToLower(); string sourceFileName = Application.get_temporaryCachePath() + "/" + val2.assetBundleName; vrcPath = Application.get_temporaryCachePath() + "/custom.vrca"; BuildTargetGroup selectedBuildTargetGroup = EditorUserBuildSettings.get_selectedBuildTargetGroup(); BuildTarget activeBuildTarget = EditorUserBuildSettings.get_activeBuildTarget(); BuildPipeline.BuildAssetBundles(Application.get_temporaryCachePath(), (AssetBundleBuild[])new AssetBundleBuild[1] { val2 }, 0, EditorUserBuildSettings.get_activeBuildTarget()); if (File.Exists(vrcPath)) { File.Delete(vrcPath); } File.Move(sourceFileName, vrcPath); EditorPrefs.SetString("currentBuildingAssetBundlePath", vrcPath); EditorUserBuildSettings.SwitchActiveBuildTarget(selectedBuildTargetGroup, activeBuildTarget); AssetDatabase.DeleteAsset("Assets/_CustomAvatar.prefab"); AssetDatabase.Refresh(); VRC_Editor.RecordActivity("avatar", Path.GetFileName(vrcPath)); } else { EditorUtility.DisplayDialog("Could not find PipelineManager", "Your scene does not contain a PipelineManager. It should be auto added by the AvatarDescriptor.", "Ok"); } } } }
public static void ExportCurrentSceneResource() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) object text; if (EditorPrefs.HasKey("originalScenePath")) { text = EditorPrefs.GetString("originalScenePath"); } else { Scene activeScene = SceneManager.GetActiveScene(); text = activeScene.get_path(); } string path = (string)text; string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(path); string text2 = null; VRC_SceneDescriptor[] array = Tools.FindSceneObjectsOfTypeAll <VRC_SceneDescriptor>(); if (array == null || array.Length != 1) { EditorUtility.DisplayDialog("Build Custom Scene", "Scene needs exactly one VRC_SceneDescriptor", "Ok"); } else { VRC_SceneDescriptor val = array[0]; if (val == null) { EditorUtility.DisplayDialog("Build Custom Scene", "You must place a VRC_SceneDescriptor on the root of you custom scene", "Ok"); } else if (val.spawns.Length < 1) { EditorUtility.DisplayDialog("Build Custom Scene", "You must add at least one spawn to spawns in your VRC_SceneDescriptor.", "Ok"); } else { FindDynamicContent(val); val.gravity = Physics.get_gravity(); val.layerCollisionArr = UpdateLayers.GetLayerCollisionArray(); val.unityVersion = Application.get_unityVersion(); EditorUtility.SetDirty(val); EditorSceneManager.MarkSceneDirty(val.get_gameObject().get_scene()); EditorSceneManager.SaveScene(val.get_gameObject().get_scene()); try { Scene activeScene2 = SceneManager.GetActiveScene(); string text3 = activeScene2.get_path(); string text4 = fileNameWithoutExtension; bool flag = false; if (text4.Contains(".")) { flag = true; string text5 = "Assets/customTmpScene12345.unity"; AssetDatabase.CopyAsset(text3, text5); text3 = text5; AssetDatabase.Refresh(); } AssetDatabase.RemoveUnusedAssetBundleNames(); string text6 = "customscene.vrcw"; AssetImporter atPath = AssetImporter.GetAtPath(text3); atPath.set_assetBundleName(text6); atPath.SaveAndReimport(); text2 = Application.get_temporaryCachePath() + "/" + text6; BuildTarget activeBuildTarget = EditorUserBuildSettings.get_activeBuildTarget(); BuildTargetGroup selectedBuildTargetGroup = EditorUserBuildSettings.get_selectedBuildTargetGroup(); BuildPipeline.BuildAssetBundles(Application.get_temporaryCachePath(), 0, EditorUserBuildSettings.get_activeBuildTarget()); EditorUserBuildSettings.SwitchActiveBuildTarget(selectedBuildTargetGroup, activeBuildTarget); EditorPrefs.SetString("currentBuildingAssetBundlePath", text2); EditorPrefs.SetString("lastVRCPath", text2); atPath.set_assetBundleName(string.Empty); atPath.SaveAndReimport(); if (flag) { AssetDatabase.DeleteAsset(text3); } AssetDatabase.RemoveUnusedAssetBundleNames(); } catch (Exception ex) { Debug.LogError((object)("Export Exception - " + ex.ToString())); throw ex; IL_0205 :; } if (text2 != null) { VRC_Editor.RecordActivity("scene", Path.GetFileName(text2)); } } } }
public override void DoGUI() { SkillEditorStyles.Init(); SkillEditorGUILayout.ToolWindowLargeTitle(this, Strings.get_BugReportWindow_Title()); SkillEditorGUILayout.LabelWidth(200f); this.controlsScrollPosition = EditorGUILayout.BeginScrollView(this.controlsScrollPosition, new GUILayoutOption[0]); GUILayout.Label(Strings.get_BugReportWindow_Bug_Title_Label(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]); this.description = EditorGUILayout.TextField(this.description, new GUILayoutOption[0]); GUILayout.Label(Strings.get_BugReportWindow_Bug_Description_Label(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]); this.extra = EditorGUILayout.TextArea(this.extra, SkillEditorStyles.TextAreaWithWordWrap, new GUILayoutOption[] { GUILayout.ExpandHeight(true) }); this.area = (BugReportWindow.ScoutArea)EditorGUILayout.EnumPopup(Strings.get_BugReportWindow_Where_does_it_happen(), this.area, new GUILayoutOption[0]); this.frequencyIndex = EditorGUILayout.Popup(Strings.get_BugReportWindow_How_often_does_it_happen(), this.frequencyIndex, BugReportWindow.frequencyChoices, new GUILayoutOption[0]); this.email = EditorGUILayout.TextField(new GUIContent(Strings.get_BugReportWindow_Your_E_mail(), Strings.get_BugReportWindow_Your_E_mail_Tooltip()), this.email, new GUILayoutOption[0]); EditorGUILayout.EndScrollView(); SkillEditorGUILayout.Divider(new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Label("PlayMaker: " + VersionInfo.AssemblyVersion, new GUILayoutOption[0]); GUILayout.Label("Unity: " + Application.get_unityVersion(), new GUILayoutOption[0]); GUILayout.Label("Build Target: " + EditorUserBuildSettings.get_activeBuildTarget(), new GUILayoutOption[0]); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); SkillEditorGUILayout.Divider(new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); if (GUILayout.Button(Strings.get_BugReportWindow_Submit_Button(), new GUILayoutOption[0])) { if (!this.isValid) { EditorUtility.DisplayDialog(Strings.get_BugReportWindow_Title(), this.errorString, Strings.get_OK()); } else { this.SubmitBugReportByMail(); } GUIUtility.ExitGUI(); return; } if (GUILayout.Button(new GUIContent(Strings.get_Command_Copy(), Strings.get_BugReportWindow_Copy_Tooltip()), new GUILayoutOption[] { GUILayout.MaxWidth(100f) })) { this.CopyReportToClipboard(); } if (GUILayout.Button(new GUIContent(Strings.get_Command_Reset()), new GUILayoutOption[] { GUILayout.MaxWidth(100f) })) { GUIUtility.set_keyboardControl(0); this.Reset(); } GUILayout.EndHorizontal(); GUILayout.Space(10f); if (GUI.get_changed()) { this.UpdateGUI(); GUIUtility.ExitGUI(); } }