Unity-Technologies / uaal-example

Other
748 stars 235 forks source link

It worked well on a swift ios project but i can't view unity. I can see it's running in console but can't view it. Any help? #28

Open Sinan-Noureddine opened 4 years ago

DavidPeicho commented 3 years ago

Just to bring more insight to this issue. With the latest SwiftUI system (wiith scenes) introduced in iOS 13, it looks like Unity doesn't hook its view anymore into the window. I have tried to manually add the view but I still can't manage to show it. Is there a workaround that would still allow to use the UIScenes system?

DavidPeicho commented 3 years ago

Temporary gross fix, using a delay: https://stackoverflow.com/questions/58893862/swiftui-and-unity/65827912#65827912

This should work with UIKit as well as SwiftUI

DavidPeicho commented 3 years ago

My attempt at making it work: https://github.com/DavidPeicho/unity-swiftui-example

xuhaodong1 commented 3 years ago

Removing storyboard works for me