classref: Sync with current master branch (53be3b7)

This commit is contained in:
Godot Organization
2025-07-05 03:33:35 +00:00
parent d438b93e7f
commit 5e15d0f969
10 changed files with 62 additions and 31 deletions

View File

@@ -272,19 +272,19 @@ Gets whether the import option specified by ``option_name`` should be visible in
.. code-tab:: gdscript
func _get_option_visibility(option, options):
func _get_option_visibility(path, option_name, options):
# Only show the lossy quality setting if the compression mode is set to "Lossy".
if option == "compress/lossy_quality" and options.has("compress/mode"):
if option_name == "compress/lossy_quality" and options.has("compress/mode"):
return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set
return true
.. code-tab:: csharp
public void _GetOptionVisibility(string option, Godot.Collections.Dictionary options)
public override bool _GetOptionVisibility(string path, StringName optionName, Godot.Collections.Dictionary options)
{
// Only show the lossy quality setting if the compression mode is set to "Lossy".
if (option == "compress/lossy_quality" && options.ContainsKey("compress/mode"))
if (optionName == "compress/lossy_quality" && options.ContainsKey("compress/mode"))
{
return (int)options["compress/mode"] == CompressLossy; // This is a constant you set
}