I was just wondering what might be the best strategy for implementing a Unity project into a already existing Swift 3 iOS project. So far I only discovered sample code in Objective-C. Is there any popular framework or wrapper out there?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- SwiftUI: UIImage (QRCode) does not load after call
相关文章
- 现在使用swift开发ios应用好还是swift?
- Programmatically setting and saving the icon assoc
- Omnisharp in VS Code produces a lot of warnings ab
- UITableView dragging distance with UIRefreshContro
- Using if let syntax in switch statement
- TCC __TCCAccessRequest_block_invoke
- Call non-static methods on custom Unity Android Pl
- Where does a host app handle NSExtensionContext#co
in my opinion this guide is extremely helpful:
https://github.com/blitzagency/ios-unity5
Please note that there are some pitfalls:
First I had several linker errors, but I did not take into account that the Unity project configuration was set up for "real devices" only. When I tried to build the project on the simulator, I had more than 100 compiler errors.
Then I tried to build it on my test device, but there were still some errors, until I noticed I had to add some of those necessary frameworks, which are listed right there:
https://github.com/blitzagency/ios-unity5/issues/36#issuecomment-303716827
The last and most important step is to follow the advices listed in the following pull request, then it will perfectly run with Swift 3:
https://github.com/blitzagency/ios-unity5/pull/42
If you use Cocoa Pods, it's better not to use the config file provided by this repo. I actually ended up manipulating all build settings manually, so there will be no conflicts with the pod config file.
I hope I could help you a little bit.
Happy coding
The tutorial mentioned in the accepted answer is a good step by step guide to integrate Unity to Swift project.
However, there are couple of changes needed for Swift 4 and Unity 2017.1. Here is a demo project in case someone needs it.