Skip to content

Commit f72c439

Browse files
committed
fix signature in docs of EditorImportPlugin._GetOptionVisibility
1 parent efb40c1 commit f72c439

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/classes/EditorImportPlugin.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,18 @@
163163
Gets whether the import option specified by [param option_name] should be visible in the Import dock. The default implementation always returns [code]true[/code], making all options visible. This is mainly useful for hiding options that depend on others if one of them is disabled.
164164
[codeblocks]
165165
[gdscript]
166-
func _get_option_visibility(option, options):
166+
func _get_option_visibility(path, option_name, options):
167167
# Only show the lossy quality setting if the compression mode is set to "Lossy".
168-
if option == "compress/lossy_quality" and options.has("compress/mode"):
168+
if option_name == "compress/lossy_quality" and options.has("compress/mode"):
169169
return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set
170170

171171
return true
172172
[/gdscript]
173173
[csharp]
174-
public void _GetOptionVisibility(string option, Godot.Collections.Dictionary options)
174+
public override bool _GetOptionVisibility(string path, StringName optionName, Godot.Collections.Dictionary options)
175175
{
176176
// Only show the lossy quality setting if the compression mode is set to "Lossy".
177-
if (option == "compress/lossy_quality" && options.ContainsKey("compress/mode"))
177+
if (optionName == "compress/lossy_quality" && options.ContainsKey("compress/mode"))
178178
{
179179
return (int)options["compress/mode"] == CompressLossy; // This is a constant you set
180180
}

0 commit comments

Comments
 (0)