Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging when macOS export will fail due to disabled texture formats. #86769

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions platform/macos/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2051,13 +2051,17 @@ bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorE
String architecture = p_preset->get("binary_format/architecture");
if (architecture == "universal" || architecture == "x86_64") {
if (!ResourceImporterTextureSettings::should_import_s3tc_bptc()) {
err += TTR("Cannot export for universal or x86_64 if S3TC BPTC texture format is disabled. Enable it in the Project Settings (Rendering > Textures > VRAM Compression > Import S3TC BPTC).") + "\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable it in the Project Settings [...]

Instead of requiring the user to dig into the settings, we should just provide a button to fix it. I implemented this in PR #78457, but the button seems to have disappeared somewhere in-between my PR and your PR? It's still present for Android, but missing for macOS for some weird reason.

valid = false;
}
} else if (architecture == "arm64") {
}
if (architecture == "universal" || architecture == "arm64") {
if (!ResourceImporterTextureSettings::should_import_etc2_astc()) {
err += TTR("Cannot export for universal or arm64 if ETC2 ASTC texture format is disabled. Enable it in the Project Settings (Rendering > Textures > VRAM Compression > Import ETC2 ASTC).") + "\n";
valid = false;
}
} else {
}
if (architecture != "universal" && architecture != "x86_64" && architecture != "arm64") {
ERR_PRINT("Invalid architecture");
}

Expand Down
Loading