mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Sync with current master branch (53be3b7)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user