• 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 Melih Şimşek · Apr 02, 2014 at 04:59 PM · 2d game

Why Unity 2D game crashes on Mobile? Help...

Hi,

I have a 2D Game. The logic of game is;

  • Infinite running

  • 6 characters with sprite animation (animals)

  • Player can switch from character to character via buttons on screen

  • There is an object pool that enables some prefabs, character jumps over these prefabs

  • There is parallal scrolling at background

  • The game speeds up over time (Time.deltatime)

  • Each character has its own sound

  • There is a background music

  • Many textures (2048 x 1126) with compressed 1024

When the game becomes faster and faster, fps becomes lover (~20fps on 512 MB Mobile Device)

The statistics below is taken from unity editor. The values are too low, but why is the fps too low on mobile devices?

alt text

untitled.png (42.9 kB)
Comment
Add comment · Show 1
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 wijesijp · Apr 03, 2014 at 05:11 PM 0
Share

If you are using Pro version of Unity there is a very helpful tool called Profiler. You maybe able to get an idea what is causing the problem with that.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by SirMcsquizy · Apr 03, 2014 at 04:50 PM

When the game becomes faster, from what I can tell. Is that its spawning more things at once. Which is making the game lag. This is what I think is happening however do not hold me to it.

Reason why I say this is when I was making a game for mobile(dabbled around in it) I would spam bullets and the game would just drop dramatically.

As I said, I could be wrong, but it could also give some insight to whats going on!

Hope I helped

Take Care

-Squizy

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
avatar image
0

Answer by king_ · Apr 03, 2014 at 05:21 PM

draw calls are 17, And there is 0 draw calls which are saved by batching , so do one thing...


make all the sprites into one png(or 2)


just pause the game in the middle see any sprites(instantiated) are out of visibility of camera,if you have any sprites out of the camera view then you have to destroy them after they leave the camera bounds

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

25 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it passible to make a ¨2D¨ sprite game with unity? 6 Answers

2D Rotation for aiming problem 1 Answer

2D Running Game (Auto running/Fixed Camera) 2 Answers

Weird 2d collision behaviour 1 Answer

Unity 2D level editor performance 1 Answer

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