Cammin / LDtkToUnity

Unity importer for the LDtk level editor
https://cammin.github.io/LDtkToUnity
MIT License
388 stars 39 forks source link

[Bug] if an Enum field is optional and has null value, the TryGet function should return false but not true. #44

Closed JustusPan closed 2 months ago

JustusPan commented 1 year ago

image if an Enum field is optional, when it's value is null fields.TryGetEnum("KeyType", out var keyType) then the return value of this TryGet should be false but currently it returns true

Cammin commented 1 year ago

In the XML documentation and the API docs, the return value is described as returning true if the field exists.
image

Cammin commented 2 months ago

Closing this, this was intended I believe