• 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 Sherdill-Noori · Oct 24, 2016 at 10:03 PM · memory leak3d platformer tutorial

Memory Leak

I have made a 3d endless runner game when I run it inside unity editor in maximize mode, the amount of memory it takes increases by time passage, can anyone help me why this happens ? Will using terrain for platform generation in endless runner game is good choice or not ?

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 hexagonius · Oct 25, 2016 at 10:24 AM 2
Share

Check out the Unity Profiler window. It will give you details on what the cause of the leak(s) is. You can't generally say that a solution might be better without knowing the cause. Find out what's the cause first.

avatar image jamius19 · Oct 25, 2016 at 11:51 AM 1
Share

completely agree with @hexagonius

Check the profiler first for bottlenecks. Or give a screenshot of the profiling window at least.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by AurimasBlazulionis · Oct 25, 2016 at 12:54 PM

You should post more information, because now it is like working on a nuclear bomb without any information.

The first thing that goes to mind is that you simply do not destroy the objects which are far away. The objects you have created will not disappear from the memory unless you say so. If that is not the case, then try to move the objects, instead of destroying and recreating them (actually it is a good optimizationethod, especially on mobile). Other than that, there is not that much information to get the idea what is wrong.

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 Sherdill-Noori · Oct 26, 2016 at 10:29 PM

I have used object pooling technique for platform generation , When I use terrain as platform the problem that I have mentioned happen but when I use cube or some other game object as platform , there is no problem , I dont know why? @TheDiamondPlay

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

3D Platformer Tutorial (No download) 2 Answers

crash memory allocation with Resources.Load() 2 Answers

Not able to load large obj Files in Unity Webgl 0 Answers

TerrainData uses too much memory 2 Answers

How to change material without memory leaks? 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