Small fix for knot creation

This commit is contained in:
barsdeveloper
2022-11-15 16:30:30 +01:00
parent f2c09faedb
commit 900245d69e
11 changed files with 405 additions and 374 deletions

View File

@@ -18,7 +18,10 @@ export default class GuidEntity extends IEntity {
return new GuidEntity({ value: guid })
}
constructor(options = {}) {
constructor(options) {
if (!options) {
options = GuidEntity.generateGuid().value
}
super(options)
/** @type {String} */ this.value
}

View File

@@ -31,6 +31,9 @@ export default class IEntity extends Observable {
defaultValue = defaultValue.calculate(this)
defaultType = Utility.getType(defaultValue)
}
if (defaultValue != null && defaultValue === defaultType) {
defaultValue = new defaultType()
}
if (!(attribute in attributes)) {
console.warn(

View File

@@ -4,7 +4,7 @@ import PinEntity from "../PinEntity"
export default class KnotEntity extends ObjectEntity {
constructor(options = {}) {
constructor(options = {}, pinType = undefined) {
super(options)
this.Class = new ObjectReferenceEntity("/Script/BlueprintGraph.K2Node_Knot")
this.Name = "K2Node_Knot"