This function returns the total number of options that exist in the extension with the given name.
The function will return undefined if the provided extension name is invalid.
extension_get_option_count(extension_name);
Argument | Type | Description |
---|---|---|
extension_name | String | The name of your extension asset as a string |
var _names = extension_get_option_names("MyExtension");
var _count = extension_get_option_count("MyExtension");
for (var i = 0; i < _count; i ++)
{
var _option_name = _names[i];
show_debug_message(_option_name + ": ");
show_debug_message(extension_get_option_value("MyExtension", _option_name));
}
This code gets the names of all options, and the number of options in the extension MyExtension.
It loops through all option names, and prints each option's name and value to the Output Log.