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 boss2070301 · Jan 30, 2021 at 03:13 AM · optimizationstucktop down shooteroptimizeslowdown

Game starts slowing down

So, I am about to finish my top-down shooter game but after a while when the enemies start spawning really fast and start stacking up the game starts to slow down and stops even on my Note 20 Ultra which has one of the newest mobile processors. What optimizations can I do to make it constantly run at a constant 60 fps.

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

Answer by GDGames0302 · Jan 30, 2021 at 07:42 AM

Firstly, you can deactivate RaycastTarget for every UI that is not a button(text, image..). This way, the game will not check every frame if the player has clicked them. Secondly, if youre using static objects, you can activate occlusion culling on the camera and bake the static objects. Also, for static objects, you can use static batching. Also, instead of instantiating and destroying, you could use object-pooling, that means you can simply activate and deactivate objects, not instantiating and destroying them. From Player Settings, you can activate IncrementalGC which empties your garbage collector gradually, not all in one frame. Also, if your enemies are 3d, meaning they have a material , you can activate GPUInstancing, which means that the game renders an object multiple times, and when you need another one, it uses a copy of the renderer, it doesn't calculate it again. Also, you can compress every sprite and music for Android. You can use also baked lighting. Also, use cheaper colliders, like CapsuleCollider, CapsuleCollider2D, BoxCollider, BoxCollider2D, SphereCollider, CircleCollider2D, and not PolygonCollider2D or MeshCollider. You enemies don't need RigidBody for detecting collision(only for physics), you can have RigidBody to the bullets(since the enemies are stacking and the bullets are destroyed or deactivated when they hit something). Don't hesitate to ask if you have further questions.

Comment
Add comment · Show 2 · 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 boss2070301 · Jan 30, 2021 at 07:49 AM 0
Share

The game is not 3d but what are static objects?

avatar image GDGames0302 · Jan 30, 2021 at 07:56 AM 0
Share

Static objects are objects that don't move. But you need batching and occlusion culling only for 3D

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

117 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 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 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 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 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

How to reduce Mixamo animation size? 0 Answers

Basic question about optimization (store variable vs accessing) 1 Answer

Is it worth making tons of similiar methods or create big one that connects things together? 2 Answers

What's more optimized? Diseable an sprite renderer or diseable the GameObject that contains the SpriteRenderer? 1 Answer

What's the best way to optimize draw calls with 100,000+ bjects? 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