Closed Artein closed 2 years ago
No it doesn't. However, a good way to still be able to debug your app especially the UI is to conditionally compile the Unity code with macros: #if
.
I basically do that for the simulator. In the simulator, the Unity code is stripped away and mocked up to return dummy data. Developers can still debug the UI.
Thank you, @DavidPeicho . Please, let me know if you will find the way. For fine-tuning of UI, it is a great feature.
For now, I found an additional workaround (without #if's and so on), to just compile to my Mac as an app designed for iPhone. Everything works as expected and super fast (at least on my MacBook Pro 2021 with M1 Pro)
Yes that's a good idea!
TBH I didn't try to work on that because:
If really I need to see the entire app running together, I run it on phone. We have a large app (500mB) and building on iPhoneX takes 2-3s on Macbook Pro 16 (obviously when re-building, not for an initial cold build).
One of the greatest features of SwiftUI is to receive almost immediate response to changes via XCode Preview. Does the combination of Unity with SwiftUI work in XCode Preview?