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 bokharij · Dec 04, 2014 at 08:27 AM · iosmobileiphonefreezinghiccup

What is causing a single hiccup at start of IOS game?

Once I launch the game and choose start from the menu the game runs fine until the 4th bullet is shoot(side scrolling shooter) or the 3rd or 4th collision(with my shooter and enemies but not the ground). At that point the game hiccups(freezes for 1sec). After this point the game runs perfectly and I can also reload the level with "Application.LoadLevel()" with no hiccups. To cause the hiccup again I need to exit the app and reopen it.

As my game is a side scroller I have enemies instantiated from the right(moving left) and the bullets are instantiated from the shooter(ship in my case) moving right. The ship can move in all directions but only shoot right.

Some notes

  • All enemies and ground have/has 2d box colliders

  • The bullet also has a collider, but also has a rigidbody

  • The shooter(ship) also has a collider and rigidbody

  • I do not have any objects instantiated at start()

  • This does not happen on android or in unity

  • I have tested iOS 8.1, iOS 7 including iPad, iPhone 5 and iPhone 4S all giving the same results.

Thank you for your help I will provide more information as needed and update if I myself find a solution. Thanks again.

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
0

Answer by g8minhquan · Dec 04, 2014 at 08:48 AM

In my experience, GameCenter, Facebook SDK, Google Analytics, Ad Mob,... (or other 3rd party library that use the internet) can be the reason. You can run the game through Xcode and monitor what exactly causes the hiccup.

Comment
Add comment · Show 8 · 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 bokharij · Dec 04, 2014 at 05:49 PM 0
Share

I do have GameCenter in my game I will try and remove it and see if that works, but I have tested disabling the Internet which still gives the hiccup. Could you please explain what Xcode would say at a hiccup as I'm new to Xcode.

avatar image bokharij · Dec 04, 2014 at 07:23 PM 0
Share

Removing GameCenter makes game hiccup at the 8th bullet.

avatar image bokharij · Dec 04, 2014 at 07:56 PM 0
Share

After I add GameCenter back it seems to still hiccup at the 8th bullet, but I did remove all the Debug.Log(). I also don't see any feedback in Xcode but Xcode also hiccups at that point(cpu monitor, fps monitor etc hiccup). I have also tried 60fps I did get an initial freeze that required a restart but after that it does the same thing(hiccup then run normally).

avatar image bokharij · Dec 05, 2014 at 01:14 AM 0
Share

I can somehow shift the hiccup position, by rebuilding removing objects. But I'm still not sure what is causing it.

avatar image g8minhquan · Dec 05, 2014 at 03:27 AM 0
Share

If it happens at the exact moment (8th bullet fired), and the hiccup is really 1s long (yeah that's too long to be acceptable), then I believe the problem is somewhere in your code. Do you use Object Pooling for your bullet / bullet explosion effect?

Anyway, try print Debug.Log everywhere that you think can be the cause. Also use profiler and try to find what can be the cause. Instantiating large and complex prefabs can also be a reason, so check for that as well

Show more comments

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Splash screen orientation - iOS 2 Answers

How to have my mobile device screen lighting on all the time 2 Answers

Using dual touchpad prefab 0 Answers

Accelerometer - accounting for gravity for arbitrary device angle 1 Answer

testing on an android device 1 Answer


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