Files
ueblueprint/js/entity/ObjectReferenceEntity.js
2022-12-28 19:02:29 +01:00

25 lines
536 B
JavaScript
Executable File

import IEntity from "./IEntity"
export default class ObjectReferenceEntity extends IEntity {
static attributes = {
type: String,
path: String,
}
constructor(values = {}) {
if (values.constructor !== Object) {
values = {
path: values
}
}
super(values)
/** @type {String} */ this.type
/** @type {String} */ this.path
}
getName() {
return this.path.match(/[^\.\/]+$/)?.[0] ?? ""
}
}