Cross-platform 2D framework written in Haxe that can export natively to desktop (windows, mac, linux), mobile (ios, android), web (js + webgl) and to unity projects
MIT License
263
stars
22
forks
source link
[ldtk] parse array type values in LdtkFieldInstance #123
I noticed that if a field type is an array,
value
is set torawValue
. That's becausetransforms a type like
Array<EntityRef>
torray<EntityRef
. And that triggers the defaultswitch
arm, which isvalue = rawValue
.This change fixes the substring call to
type.substring(6, type.length - 1)
and converts/parses each item in the array individually.trace(value)
of an exampleArray<EntityRef>
field type prints:before the change
after the change