• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ltorje · Mar 15, 2013 at 07:08 PM · applicationinsideanotherwrap

Wrap unity3d inside an existing app

Hi, Is it possible to wrap unity3d inside an existing app. Did someone tried already doing something like this?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image murkantilism · Mar 15, 2013 at 07:20 PM 1
Share

Could you clarify this?

What do you mean by "Unity 3D"? The Unity 3D editor? A finished Unity 3D game or project?

And what do you mean by app? What platform? Windows 8? iPhone/Droid app? Web app?

avatar image ltorje · Mar 16, 2013 at 06:52 AM 0
Share

So far I've managed to create an iOS library from the angrybots unity sample game (in the future I'll replace it with my own game) and load it into another iOS app. There are several problems:

 It needs its own view controller & view (that is doable, with a couple of hours I'll manage to get my own EAGLView updated by a controller)
 Capture the surface touch and send it to the native unity layer (again doable)
 Start and stop the unity game - once the game is started, stopping it and starting it leads to app crashes
 Start multiple games, each one in its own window - if 3) fails i do not have high hopes on this one
 Start the game from a UI Button, fullscreen, and tapping on a ui button inside the game get back to the main app while the game itself gets paused (I was thinking to use url schemes in order to get back to the spawning app but there should be another way - how can i get a message from the objective c code that the game wants to be paused/terminated?)

What are the caveats for doing something like this with a unity game?

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by ltorje · Mar 16, 2013 at 06:58 AM

So far I've managed to create an iOS library out of the angrybots unity sample game (in the future I'll replace it with my own game) and load it into another iOS app. There are several problems:

  1. It needs its own view controller & view (that is doable, with a couple of hours I'll manage to get my own EAGLView updated by a controller)

  2. Capture the surface touch and send it to the native unity layer (again doable)

  3. Start and stop the unity game - once the game is started, stopping it and starting it leads to app crashes

  4. Start multiple games, each one in its own window - if 3) fails i do not have high hopes on this one

  5. Start the game from a UI Button part of an app,the game should be started fullscreen, and tapping on a ui button inside the game get back to the main app while the game itself gets paused (I was thinking to use url schemes in order to get back to the spawning app but there should be another way - how can i get a message from the objective c code that the game wants to be paused/terminated?)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Open Url in browser on button click 1 Answer

How add advertising in a free Android application using unity 1 Answer

place data locally from install 0 Answers

Unity.exe - Application Error 3 Answers

Cloud recognition in Vuforia 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges