- Home /
Heavy Unity scene on Android (Samsung Galaxy)
Hi, I was working on a work simulator on Unity 3d, in which one of the tasks to do is to put books in a library in place, with all the book data like the type (narrative, poetry and theatre), author and title (from A to Z).
This takes in mind this task concretely needs 12 books for each shelf, 2 shelves each letter of the alphabet, 13 letters each category and 3 categories in the library. This means around 1800 books in place, and you have to put in place 5 books by hand.
Now the issue here is when I try to do this on an Android device, a Samsung Galaxy device. The problem is that even with all the optimizations I already did, the scene goes on low FPS. I removed additional geometries that took most of the framerate and optimized most of the framerate-consuming scripts, but still nothing.
All I can tell is that on scripts I am trying to use GameObject.Find() calls outside Update() and the sort, and if not, at least I put on it a once-only condition so it doesn’t overload anything. This in all the scripts used. All books use the same script related to the book data and behaviour.
And the books are already at minimal polycounts: they’re just textured 6-faced cubes (12 tris each book).
And I’m using mostly mobile shaders.
So, all I want to ask is, is there a better way to run this smooth on Android?
TL;DR, but it's pretty urgent.
Answer by Itinerant · Oct 09, 2012 at 05:32 PM
Here's a thought: You say you only need 5 books to actually move, right? Turn the rest of the books that are beside each other into a single object, then retexture them to look 'normal.' You can fake having 1800 books while only using a half dozen or so gameobjects, each with a dozen or so tris.
Well, there's a small issue though: we need to see the category, author and title data of each book when we hover the finger over it. What if it's like this? Can I just fake that too somehow?
$$anonymous$$y first thought would be to replace each book with a plane collider. $$anonymous$$aybe go into your 3d and $$anonymous$$r off the back end of each book, so only the front is there. Then bring it into Unity and remove/turn off the mesh render element, so only the colliders are left. Or make all new plane colliders. Use those to get your mouseover/raycast data. I'm not sure how much those colliders will cost your performance, but it should still be better than having rendered faces.
No problem. Post back if it ends up working for you, I'm interested in what your solution will end up being, as I'll be working on a library soon :)
Answer by hvilela · Oct 09, 2012 at 01:33 PM
With no access to the project is kind of impossible to identify the problem. I can only recommend you to use Unity Profiler to see where is your bottleneck.
Your answer
Follow this Question
Related Questions
Why does my game require so much rendering power? 1 Answer
Question about 'performance' between iPhone4 and (4s & ipad3) 2 Answers
A node in a childnode? 1 Answer
Bad fps on blank project android,Very bad fps on completely blank project (mobile) 0 Answers
Blackberry unity game not loading up 1 Answer