Skip to main content

Editor.Model.EntityBaseType

Enum

Enum defining the base types an entity prototype can represent.

Index

Enumeration Members

Example

// EntityBaseType distinguishes Components from Assets when resolving an
// entity type through IPackageRegistry.getTypeByName().
const registry = this.pluginSystem.findInterface(
Editor.IPackageRegistry
) as Editor.IPackageRegistry;

// "Material" is a well-known Asset-base entity type.
const materialType = registry.getTypeByName(
'Material',
Editor.Model.EntityBaseType.Asset
);
console.log(`Asset type "Material" resolved to: "${materialType}"`);

// Component-base lookups use EntityBaseType.Component in the same way:
// registry.getTypeByName('MyCustomComponent', Editor.Model.EntityBaseType.Component)
console.log('Enum values:', Editor.Model.EntityBaseType.Component, Editor.Model.EntityBaseType.Asset);

Enumeration Members

Asset

Asset: number

Identifies the entity as an asset type.


Component

Component: number

Identifies the entity as a component type.