Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Dan T · Apr 07, 2010 at 10:28 AM · guiperformancedrawcalls

Is there anyway to get Unity GUI to cache an image?

The overhead of rebuilding the GUI every frame (sometime multiple times per frame) is dragging down the performance of my app. Is there any way to have GUI areas cache an image once rendered and use that until the data changes or I call an GUI.Update() style function? Maybe a way to stop OnGUI Being called and using the GUI image that was built in a previous frame until something is flagged to redraw it?

Anyone had any luck implementing something like this?

Comment
Add comment · Show 1
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 qJake · Jun 08, 2010 at 11:35 PM 0
Share

Unity automatically makes performance enhancements (including caching) behind-the-scenes, so it's more likely that you're doing something wrong that you shouldn't be. Post the code that makes the game run slow, and maybe someone can give you some pointers on how to optimize it.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Jean-Fabre · Jan 19, 2011 at 01:46 PM

Hi Dan T,

Are you trying to have some kind of static gui like a watermark or fancy static borders that mask the scene like binoculars or else? if that's the case then you could look into having a dedicated camera for the gui, render it into a texture and then compose the texture back in your main camera again.

but if you expect the gui to be responsive, you will not be able to skip or optimize much.

Have you tried EZGUI? it is more performant than the built in gui system, so you should definitly give it a serious look.

Hope it helps,

Jean

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 Jessy · Jan 19, 2011 at 02:10 PM 0
Share

OnGUI is called more than once per frame.

avatar image Jean-Fabre · Jan 19, 2011 at 02:23 PM 0
Share

oupps, checked the help, let me edit it.

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

No one has followed this question yet.

Related Questions

Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer

Best way to optimize scene with multiple instances of a destroyable object 1 Answer

Sprite sheets performance 0 Answers

Text in Unity's GUI -- how is it done? 1 Answer

Static variables & performance 2 Answers


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