mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-20 21:45:56 +08:00
Fix attributes keys order
This commit is contained in:
@@ -324,9 +324,9 @@ export default class Grammar {
|
||||
r.LocalizedText,
|
||||
r.InvariantText,
|
||||
r.PinReference,
|
||||
Grammar.createEntityGrammar(r, Vector2DEntity, true),
|
||||
Grammar.createEntityGrammar(r, VectorEntity, true),
|
||||
Grammar.createEntityGrammar(r, LinearColorEntity, true),
|
||||
Grammar.createEntityGrammar(r, Vector2DEntity, true),
|
||||
r.UnknownKeys,
|
||||
r.ObjectReference,
|
||||
r.Symbol,
|
||||
|
||||
@@ -89,7 +89,15 @@ export default class ISerializer {
|
||||
let result = ""
|
||||
let fullKey = key.concat("")
|
||||
const last = fullKey.length - 1
|
||||
for (const property of Object.getOwnPropertyNames(object)) {
|
||||
const attributes = /** @type {EntityConstructor} */(object.constructor).attributes
|
||||
const keys =
|
||||
attributes ?
|
||||
Utility.mergeArrays(
|
||||
Object.getOwnPropertyNames(attributes),
|
||||
Object.getOwnPropertyNames(object)
|
||||
)
|
||||
: Object.getOwnPropertyNames(object)
|
||||
for (const property of keys) {
|
||||
fullKey[last] = property
|
||||
const value = object[property]
|
||||
if (value?.constructor === Object) {
|
||||
|
||||
Reference in New Issue
Block a user