This function tells whether an extension with the given name exists (true) or not (false).
extension_exists(extension_name);
Argument | Type | Description |
---|---|---|
extension_name | String | The name of your extension asset as a string |
if (extension_exists("MyExtension"))
{
var _options = extension_get_options("MyExtension");
var _enabled = _options.enabled;
}
This code checks if the MyExtension extension exists, and if it does, gets its options as a struct, and reads a value from it.