Overlaying unity on existing xcode project

This is an exploratory question at the moment. I have an iPad app in the app store already and one of the features of the app is to allow the user to roll random dice, 2 10 sided die. Basicly role the dice as they bounce off of the sides of the screen with everything transparent except for the dice and shadows.

As I am learning Unity I thought it would be fun to incorporate dice begin rolled on the screen on top of the image displayed on the iPad instead of just random number showing up. If I build a Unity dice rolling app can I integrate that code with my current code in xcode?

The reason I ask is that I notice from videos that Unity seems to export completed code that runs on IOS devices. I was not sure how well you could integrate Unity with other code written in xcode?

Thanks

I have no experience in such stuff, but I’ve watched as others have tried that. As I’ve understood it, it is possible, but not easy. Unity is meant to be “standalone”, and integrating other functionality to it is easiest achieved by writting native iOS-plugins (and there’s already numerous plugins available for all sort of things). What kind of functionality you’re needing outside the Unity? You have some existing app, how complicated that is? A good learning process to Unity might be a project where you convert an existing application to Unity-version, learn how something is done the “Unity-way”.

The app that I wrote is called XP Tracker. Its designed for the pen and paper RPG where you have a character sheet and books with tables. The app is designed to remove all the scratch paper for calculating skill and item bonuses, do the dice rolling for you and calculate experience points.

I was hoping to just add the ability to have the user push the role die button like they do now, but instead of displaying a number have it look like 3d dice were rolled on top of the screen.

What you are talking about is to rewrite the program in Unity to add that functionality in. Here are a few photos of the app https://itunes.apple.com/us/app/xp-tracker/id585481620?mt=8

I have tons of experience with Objective C but a rewrite in Javascript which I am unfamiliar with might be difficult.

You can, without alot of struggle do it if Unity is your central app and all you want to do is show modal views over the top of Unity. Unity I believe actually has some documentation themselves on how to do this. If you purchase Prime31’s ‘etcetera’ plugin he actually has an implementation of this running that will show a UIWebview, or mailer and some other things. It’s pretty easy to extrapolate the code in his plugin to show other view controllers.

However to do it the other way, as in take an existing Xcode app and treat unity as this modular thing to load in and display over the top. That can be done. reliably, but it’s not as straight forward and it isn’t documented. You really need to have a firm grasp of iOS programming to be comfortable with doing it.