mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-14 00:54:48 +08:00
WIP
This commit is contained in:
@@ -25,6 +25,7 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
return this.#path
|
||||
}
|
||||
set path(value) {
|
||||
this.#name = ""
|
||||
this.#path = value
|
||||
}
|
||||
|
||||
@@ -36,6 +37,8 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
this.#full = value
|
||||
}
|
||||
|
||||
#name = ""
|
||||
|
||||
/** @param {(t: String, p: String) => String} full */
|
||||
constructor(
|
||||
type = "None",
|
||||
@@ -101,7 +104,13 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
}
|
||||
|
||||
getName(dropCounter = false) {
|
||||
return Utility.getNameFromPath(this.path.replace(/_C$/, ""), dropCounter)
|
||||
if (!this.#name) {
|
||||
if (!dropCounter) {
|
||||
return this.#name = Utility.getNameFromPath(this.path.replace(/_C$/, ""), dropCounter)
|
||||
}
|
||||
return Utility.getNameFromPath(this.path.replace(/_C$/, ""), dropCounter)
|
||||
}
|
||||
return this.#name
|
||||
}
|
||||
|
||||
doSerialize(insideString = false) {
|
||||
|
||||
Reference in New Issue
Block a user