Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 zozogame · Oct 04, 2010 at 03:42 PM · iphone

Unity iOS4 Multi-Tasking Feature Support

Hi,

When I deploy for iOS 4 devices I find there's a few problems when unity work together with the iOS's multi-task features. Sometimes the background music is mute and touch control was disable when my game awakes from background process.

I guess it could because some initialization process I did with the Start() function lost its state when I hit the "home" button on iDevice, so they will not resume unless you do it manually again when I awake the game from background.

What is the underline concept for unity engine to handle those background/active swap of game state?

Is there any delegate function in unity similar to applicationDidEnterBackground: / applicationWillEnterForeground: messages that we do with XCode?

Comment
Add comment
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

1 Reply

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

Answer by Dreamora · Oct 04, 2010 at 07:37 PM

Did you use Unity 3 Unity iPhone 1.x does not target iOS4 and has side effects due to it.

The handling for "coming back" and "going to sleep" is done through OnApplicationPause( bool pause ) :)

Comment
Add comment · Show 4 · 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
avatar image zozogame · Oct 05, 2010 at 03:49 AM 0
Share

I'm using unity 3. Thanks for the advise but would you please explain the OnApplicationPause function a little more? If I want to restart the music when the game "co$$anonymous$$g back" from background what should I do?

avatar image Herman-Tulleken · Jan 19, 2011 at 12:21 PM 0
Share

@Dreamora Does OnApplication actually work (have you seen it in action)? If so, is there something you need for it to be working? Ours just doesn't get called...

avatar image Dreamora · Apr 16, 2011 at 09:44 PM 0
Share

Got called fine for me on iOS 4.x devices, Unity 3.x, if the function is added on a monobehaviour.

avatar image neonplaymark · Sep 15, 2011 at 10:46 AM 0
Share

It will only work on iOS 4.0 and upwards because that is the OS version when multi-tasking was added.

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.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Unity 3 and Unity iPhone Basic 1 Answer

iPhoneUtils.PlayMovie seems disabled in Unity 3 2 Answers

Flipping textures 0 Answers

Unity3 beta, iPhone publishing 3 Answers

Does Unity3 iOS support all generations of iPod/iPhone? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges