extension_exists

This function tells whether an extension with the given name exists (true) or not (false).

 

Syntax:

extension_exists(extension_name);

ArgumentTypeDescription
extension_nameStringThe name of your extension asset as a string

 

Returns:

Boolean

 

Example:

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.