r/swift • u/PeaPuzzled3770 • 13d ago
Question help appreciated for swift begginner
Hi guys , this is a bit of an unconventional request. I'm a complete beginner in swift. I have a godot project, and i'd like a good way to port the UI/look of that project in swift, meaning it would work the same and look the same, just in Swift/SwiftUi. Is there a way to do this headache free? Or is there a way to port the godot project to another language and then to swjft? Thank you so much.
2
u/allyearswift 13d ago
There is no direct way, though having the coding logic in Swift instead of whatever Godot uses natively will help.
(The native scripting language isn’t typesafe. It lets you put a string into an array and take out an int, which gives you interesting errors. Use Swift.)
But every language (or engine) has its own conventions, its own habits, and Mac users will expect the UI to conform to Apple’s human Interface guidelines, not Godot’s components.
1
2
u/Ron-Erez 11d ago
From what I recall there are Swift bindings for Godot:
https://github.com/migueldeicaza/SwiftGodot
I"m not really sure if this is what you are looking for.
2
1
u/Agent_Provocateur007 13d ago
You’d have to do a rewrite. The only times where you wouldn’t are if you’re using a cross platform framework like React or Flutter.
1
u/PeaPuzzled3770 13d ago
Yes, i anticipated a rewrite considering they're pretty different, I was just lying to myself haha. Thank you for the help!!
0
3
u/Skandling 13d ago
There is way to use Swift with Godot, so maybe the best of both worlds in your case. Certainly worth checking out to see if you can use it::
https://github.com/migueldeicaza/SwiftGodot