2

In my game, I have a scrollrect which its content have a VerticalLayout component. When I fill that with so many count of GameObjects, the game will fall in problem!

My list has more than 300 GameObjects.

How to optimize my scroll list?

8
  • "the game will fall in problem" you need to be more specific about how it is failing for us to be able to help you fix it. Commented Aug 5, 2016 at 18:58
  • @ScottChamberlain a list with more than 300 game objects will cause leak memory. I have to create just game objects that show in pane and simulate scroll, but i don't know how to do that. Commented Aug 5, 2016 at 19:55
  • Please show the proof that you found that putting 300 objects in the list causes a leak as a edit to your question Commented Aug 5, 2016 at 20:05
  • @ScottChamberlain Memory leak is happen in android and ios devices. In windows there is no problem. Commented Aug 5, 2016 at 20:13
  • 1
    Again, show your proof. For example you can attach the profiler to an android or iOS device and show the leak happening there. Take a screenshot and put it in your question. Without it you are unlikely to get any answers. Commented Aug 5, 2016 at 20:15

1 Answer 1

2

I solved my problem (Performance issue, as Scott Chamberlain said) by do some tips in Optimising Unity new UI System Article.

Disabling pixel perfect is very useful tip that works for me:

  • ScrollRect will rebuild / reload everything every frame if pixel perfect is enabled.
  • Canvas PixelPerfect has large performance impact. Disable it if possible.

Another useful tip:

  • Disable gameobject when off-screen
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.