IBehaviorInfo defines the configuration for a behavior. It is typically accessed in the behavior constructor via
- Set the name of the addon. Typically this is read from the language file.
- Set the description of the addon. Typically this is read from the language file.
- Set the version string of the addon, in A.B.C.D form. Typically this is set to the
- Set the category of the addon. Typically this is set to the
BEHAVIOR_CATEGORY constant. It must be one of
- Set a string identifying the author of the addon.
- Set a string specifying a URL where the user can view help and documentation resources for the addon.
- SetIcon(url, type)
- Set the addon icon URL and type. By default the URL is
"icon.svg" and the type is
"image/svg+xml". It is recommended to leave this at the default and use an SVG icon, since it will scale well to any display size or density. However you can change your addon to load a PNG icon with
- Set a boolean of whether the behavior is allowed to be added more than once to the same object. The default is
false, which means the behavior can be added multiple times to the same object. Set to
true to only allow it to be added once to each object.
- Set a boolean of whether the addon is deprecated or not. If you wish to replace your addon with another one, the old one can be deprecated with
SetIsDeprecated(true). This makes it invisible in the editor so it cannot be used in new projects; however old projects with the addon already added can continue to load and work as they did before. This discourages use of the deprecated addon without breaking existing projects that use it.
false to prevent the addon from being bundled via the Bundle addons project property. By default all addons may be bundled with a project, and it is recommended to leave this enabled for best user convenience. However if you publish a commercial addon and want to prevent it being distributed by project-bundling, you may wish to disable this.
- Set the available addon properties by passing an array of PluginProperty. See Configuring Behaviors for more information.
- Add a dependency on a Cordova plugin, that will be included when using the Cordova exporter. For more information see Specifying dependencies.
- Add a dependency on another file included in the addon. For more information see Specifying dependencies.
- AddRemoteScriptDependency(url) Not recommended
- Add a script dependency to a remote URL (on a different origin). For more information see Specifying dependencies.
- Specify which runtimes the behavior supports as an array of strings. Valid runtime strings are either
"c3". For more information see Runtime scripts.
Addon SDK Manual
You are here:
Search this manual:
This manual entry was last updated on 27 Apr, 2018 at 11:55