Editor.IEntityPicker
ClassPopup window that allows the user to choose specific objects in the Scene hierarchy, or assets in the Asset Browser.
Index
Properties
Methods
Example
// Get access to the project's model component
const model = this.pluginSystem.findInterface(Editor.IModel);
const project = model.project;
// Get access to the picker component
const refPicker = this.pluginSystem.findInterface(Editor.IEntityPicker);
// Open a picker
const type = "SceneObject"
// or Asset, etc.
refPicker.requestPicker(type, (pickedReplacementUid) => {
console.log(pickedReplacementUid);
})
// List assets in project
const assetManager = project.assetManager;
assetManager.assets.forEach( asset => {
console.log(asset.id);
})
// List objects in project's scene
const scene = project.scene;
scene.sceneObjects.forEach( obj => {
console.log(obj.id);
})
Extends
Properties
interfaceId
staticinterfaceId:InterfaceId
Interface identifier for IEntityPicker.
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
Inherited from
requestPicker()
requestPicker(
entityType,callback,contextEntities?):void
Open a picker dialog for the user to select an entity of the specified type.
Parameters
| Parameter | Type |
|---|---|
entityType | string |
callback | (arg1) => void |
contextEntities? | any |
Returns
void