mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 09:44:49 +08:00
Fix niagara script variables merging
This commit is contained in:
@@ -389,18 +389,18 @@ export default class ObjectEntity extends IEntity {
|
||||
}
|
||||
/** @type {ObjectEntity} */
|
||||
const subObject = this[k]
|
||||
if (!subObject.ExportPath?.valueOf().path.includes(this.Name.toString())) {
|
||||
if (!subObject.ExportPath?.valueOf(this).path.includes(this.Name.toString())) {
|
||||
continue
|
||||
}
|
||||
const originalExportPath = subObject.ExportPath.valueOf()
|
||||
const originalExportPath = subObject.ExportPath.valueOf(this)
|
||||
const position = originalExportPath.path.indexOf(this.Name.toString())
|
||||
const prefix = originalExportPath.path.substring(0, position)
|
||||
const suffix = originalExportPath.path.substring(position + this.Name.toString().length)
|
||||
const mirroredEntity = /** @type {typeof ObjectEntity} */(subObject.constructor).attributes.ExportPath
|
||||
subObject.ExportPath = new mirroredEntity(
|
||||
() => new (mirroredEntity.type)(
|
||||
(self = this) => new (mirroredEntity.type)(
|
||||
originalExportPath.type,
|
||||
prefix + (this.Name ?? "").toString() + suffix,
|
||||
prefix + (self.Name ?? "").toString() + suffix,
|
||||
originalExportPath.full
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user