简体   繁体   中英

Exporting Unity project to Android Studio / XCode continuously

I'm developing a game on Unity for Android & iOS.

When building the project, on both platforms, Unity builds a project you can import into Android Studio / XCode, then add the platform-specific code on Java / Swift / Obj-C.

This is great in its own, but since the game is still under heavy development, it'll ease things greatly if I could shorten the build pipeline.

Currently it's:

  1. Build in Unity and get a exported project folder
  2. Open Android Studio / XCode
  3. Import the Unity project
  4. Add the platform specific files (I have lots of those since I use external SDKs)
  5. Build & Debug

So my questions are:

  1. Is there a way for Unity to update an existing Android Studio / XCode project?
  2. Is there a way to add the platform-specific files to Unity so it'll create the project structure on its own? (and even build & install the app?)

I'm working through this myself, with PC-based Android development (build via Android Studio), and Mac-based iOS development (build via XCode). The approach I currently plan to use is to place the platform-native code in library modules, the Unity build-files in their own dedicated module, and have a platform-native wrapper to bind it all together.

This approach also promotes separation of scope and versioning - you can quickly iterate through changes to either the native or Unity codebase, keeping the other part version-locked. It also prevents Unity version-upgrades from mucking up your native codebase, as Unity builds for Android/iOS can change internal structure across versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM