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 GutoThomas · Jul 04, 2012 at 04:31 AM · guimobileperformance3dtext

Best way (talking about performance) to build a menu. OnGUI or 3D with ortographic camera.

Hey everyone. Just a performance doubt here. I heard a lot about the bad performance of the OnGUI class in Unity so I though about making my menu with planes filled with textures and use OnMouseUp.. etc, functions.

As my game is for mobile, I though it will also be better because I can't change the size of a font in OnGUI dinamically, but I can change the local scale of a 3D Text, what will make almost the same effect.

Just focusing on performance, which one is better?

Thanks from now!

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
Best Answer

Answer by whydoidoit · Jul 04, 2012 at 04:37 AM

So do not, under any circumstances, use OnGUI for mobile in game display - the performance is absolutely awful. I have specific advice from Unity that it should not be used due to the number of draw calls, the multiple calls per frame and the need to fully redraw the view if you use it. I am currently going through the process of a rewrite of the few bits of OnGUI I had and using NGUI instead and it has made a big difference.

However, if you are just drawing a menu that doesn't appear over live game play it will work. One of the big problems is the way that Unity optimises frame rate over UI events that means that if the rate drops (with the standard Xcode project for instance) then the buttons don't always work because input events are missed.

Comment
Add comment · Show 4 · 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 GutoThomas · Jul 04, 2012 at 04:47 AM 0
Share

I have a couple of OnGUI elements appearing in the game. Like side tabs for weapon selection. I tried to optimize it as much as I can, so every element of this tab is just rendered either if the tab is opening or already opened. And.. we can surely see that the performance drop down a lot! I really hope they rewrite some of these things that are causing this awful performance, because OnGUI is a pretty powerful functionality if you take some time to figured out some tricks.

avatar image whydoidoit · Jul 04, 2012 at 04:49 AM 0
Share

We can hope :) I understand that it has been in the works forever. I like OnGUI for editor stuff where it works well and I invested a lot of time in building a nice retained framework - all for nothing I think... Guess I should have done some performance tests first. NGUI is well worth a look if you ask me - it's doing what I need.

avatar image GutoThomas · Jul 04, 2012 at 04:53 AM 0
Share

I really need to finish this project to be able to buy a GUI system, hahah! Fortunatelly, it's not a huge thing and I'm almost done, except for most of the GUI things. I'll build my menu with planes and 3D texts, this way I gain performance and the ability to increase text size to fit exactly the screen needs.

avatar image GutoThomas · Jul 04, 2012 at 05:15 AM 0
Share

Does mobile support 3D Text? Because I set up a custom text, material with Text shader and everything but in the device I just see the squared shapes where the text should be! **Seems like the problem is with my custom font!

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

World canvas with screen space canvas performance mobile ? 0 Answers

Mobile Performance with GUI and Rotations 0 Answers

UI elements problem 0 Answers

How to scale different GUI objects to fit screen size ANDROID 1 Answer

Performance on mobile: Shader Vs Mesh deformation 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