How to collaborate the development between Unity and XCode

Hello everyone, nice to meet you!
I’m Leo, and I have a question about collaborating on development between Unity and Xcode for the Apple Vision Pro. Is this integration possible? If so, could anyone provide some guidance or resources to help get started?

Is it possible…?

Thank you all in advance!

You might have to be more specific about what you want to achieve using both Unity and Xcode, but this page in our documentation might prove useful. It describes how to include SwiftUI plugins (that is, native visionOS UI code) in your Unity project.

What I mean is, for a project involving both an iOS developer and a Unity developer, is it possible for them to collaborate on the same application? For example, the iOS developer handles creating scenes or pages in the application, such as the login page, while the Unity developer focuses on the core scene, such as features like object placement in world space. Can this single application be integrated? And how would the collaboration process work?

Do you mean iOS or visionOS? It’s definitely possible to use the same basic codebase (for SwiftUI, e.g.) in iOS and visionOS, and use compiler directives for platform-specific code. Similarly, you can build Unity projects that can build to both iOS and visionOS.

The best way to do this at the moment (AFAIK) would be to use a Unity app that includes SwiftUI elements (as in the link I provided). In that case, I believe you can have the Swift developer iterate on an Xcode project generated by Unity, and copy the Swift files back into the Unity project. In that setup, Unity is responsible for the “main” part of the application.

The other option, where the “main” part of the application would be a standard Swift/Xcode app, would be Unity as a Library. That’s not something we officially support for visionOS, but I believe that some developers have managed to get it working. If that’s a feature you’re specifically interested in for visionOS, I’d suggest submitting it as a priority to our road map.

Ah i see, thank you before.

can you give me more detail on Option 1, and more documentation if there is.

I think the option 2 will be quite more difficult, ah i see unity is about to make it that happen, sure i will suggest it. on road map 2.

1 Like

The only documentation is the sample that I linked here. I’d suggest looking at that sample to get an idea of how it works.

Ok Thank you kapolka.

if i have question can i later ask again kapolka…?

Yes; feel free to ask! I read all posts in Discussions under the visionOS tag.

1 Like