private void OnEnable() { // Load JEM editor resources JEMEditorResources.Load(); // Apply title titleContent = new GUIContent("JEM Asset Builder", JEMEditorResources.JEMIconTexture); // Try to load configuration. JEMAssetsBuilderConfiguration.TryLoadConfiguration(); // Load Saved vars. _assetsScroll = new SavedVector2($"{nameof(JEMAssetBuilderWindow)}.AssetsScroll", Vector2.zero); _packagesScroll = new SavedVector2($"{nameof(JEMAssetBuilderWindow)}.PackagesScroll", Vector2.zero); // Load packages! LoadPackages(); }
public static void ExportSelectedDirectly(MenuCommand menuCommand) { if (Selection.objects.Length == 0) { EditorUtility.DisplayDialog("Oops.", "No assets selected to build.", "Ok"); } else { // Try to load configuration first JEMAssetsBuilderConfiguration.TryLoadConfiguration(); // Get save file path var path = EditorUtility.SaveFilePanel("Export Assets", Environment.CurrentDirectory, "myAssetBundle", JEMAssetsBuilderConfiguration.GetExtension().Remove(0, 1)); if (string.IsNullOrEmpty(path)) { return; } // Export directly. ExportDirectly(path, Selection.objects); } }
private void OnEnable() { // Try to load configuration! JEMAssetsBuilderConfiguration.TryLoadConfiguration(); }