Editor.IPlugin
ClassInterface representing a plugin.
Index
Properties
Methods
Example
// A CoreService subclass is itself an IPlugin — `this` is the plugin
// instance. Use `this.pluginSystem` to resolve interfaces declared in
// the descriptor's `dependencies` array.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
// React to the user switching projects (open/new) by registering a
// handler on onProjectChanged.
const conn = model.onProjectChanged.connect(() => {
console.log(`Plugin ${this.id}: switched to a new project`);
});
this.connections.push(conn);
Extends
Extended by
IPanelPluginAssetInstantiatorChatToolCoreServiceDialogPluginEditorPluginEntityGeneratorGuiServicePluginVerifierPresetProjectSettingsPluginUriHandlerPlugin
Properties
id
readonlyid:string
Unique string identifier of the plugin instance.
Methods
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean