private static void TryUnpackBugReport() { var path = UTinyBugReportWindow.k_BugPackagePath; var guid = AssetDatabase.AssetPathToGUID(path); if (!string.IsNullOrEmpty(guid)) { UTinyBuildPipeline.InstallSamples(false); AssetDatabase.ImportPackage(path, false); AssetDatabase.DeleteAsset(path); } }
private void DoLayoutNoOpenProject() { var newProject = false; var loadProject = false; var installSamples = false; EditorGUILayout.BeginVertical(); { EditorGUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); GUILayout.Label($"No {UTinyConstants.ApplicationName} Project open"); GUILayout.FlexibleSpace(); } EditorGUILayout.EndHorizontal(); GUILayout.Space(5); EditorGUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); if (GUILayout.Button($"New {UTinyConstants.ApplicationName} project")) { newProject = true; } if (GUILayout.Button($"Open {UTinyConstants.ApplicationName} project")) { loadProject = true; } GUILayout.FlexibleSpace(); } EditorGUILayout.EndHorizontal(); GUILayout.Space(5); EditorGUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); if (GUILayout.Button("Import sample projects", UTinyStyles.LinkLabelStyle)) { installSamples = true; } GUILayout.FlexibleSpace(); } EditorGUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); } EditorGUILayout.EndVertical(); if (newProject) { NewProject(); } if (loadProject) { LoadProject(); } if (installSamples) { UTinyBuildPipeline.InstallSamples(true); } }