Closed tishin closed 5 months ago
Thank you, I didn’t realize Foundation was the source of this pain.
I don’t mind removing the asData() one for the sake of reducing the dependency. Would love to find a way of making people’s lives easier still for that common idiom.
I just dropped the asData
with the suggestion from above.
This leaves only 2 imports in
SwiftGodot
whereFoundation
is actually used:PackedByteArray.asData()
returningData
Numeric.snapped
native implementation usingfloor()
Both can be refactored without using
Foundation
dependency, which is too heavy for non-Darwin platforms compared to the convenience it brings. I think it should be up to users to decide whether they want to includeFoundation
into their game or not.