mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-27 10:44:43 +08:00
Small fix for knot creation
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user