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 BenouKat · Jan 31, 2013 at 12:54 PM · guiperformanceonguirepaintgarbage

How completly remove GUI.Repaint() calls ?

Hi !

The question seems obvious but it's not. How to remove calls made by OnGUI, because of garbage collector spikes, and performances issue of Repaint() function. (ex : http://www.mindthecube.com/wp-content/uploads/2010/09/GUI-bound2.png)

Is there a way to completly remove these calls ?

Of course, i already remove the only OnGUI() call on my scene but calls to Repaint() is still here. I read a rumor that i need to remove every OnGUI() calls of my whole project. Is that true ?

Comment
Add comment · Show 6
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 Wolfram · Jan 31, 2013 at 09:47 PM 0
Share

Your snapshot lists several scripts with OnGUI() that are still being called. So either they are still in your scene, or you should check whether they are Editor scripts, or executed in Edit mode, in which case they will always be active.

avatar image BenouKat · Feb 12, 2013 at 06:46 PM 0
Share

It's not my snapshot it's an exemple. I will check for calls in edit mode only :)

avatar image $$anonymous$$ · Feb 22, 2018 at 06:39 PM 0
Share

Hi Benou$$anonymous$$at,

I am not sure if this helps but here goes. I have also attached a pic showing an error and I don't know why that's happening and if I am supposed to do anything about it

Thanks & Regards, Bhanu

alt text

profiler.jpg (239.2 kB)
assertion-failed.jpg (10.6 kB)
avatar image meat5000 ♦ $$anonymous$$ · Feb 22, 2018 at 06:57 PM 0
Share

Start a new question rather than hijacking an existing QA.

avatar image BenouKat $$anonymous$$ · Feb 23, 2018 at 10:00 AM 0
Share

That's nothing, ignore this error. As meat5000 said, start a new question if it's not related to this one ;)

Have a great day !

avatar image $$anonymous$$ BenouKat · Feb 23, 2018 at 11:10 AM 0
Share

Thanks a lot but this is related to GUIRepaint so I posted here

1 Reply

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

Answer by BenouKat · Apr 18, 2013 at 10:45 AM

I was a hidden script which actually call OnGUI function. Removed, and problem gone.

Sorry !

Comment
Add comment · Show 11 · 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 $$anonymous$$ · Feb 20, 2018 at 02:24 PM 0
Share

Hi,

I don't have a single OnGUI() in any of my scripts but still getiing 384B GC Alloc. Please help

Thanks & Regards, Bhanu

avatar image BenouKat $$anonymous$$ · Feb 20, 2018 at 02:28 PM 0
Share

Sometimes Unity Editor triggers OnGUI(). Can't you check where the function is called by doing a "deep profile" in the profiler ?

avatar image $$anonymous$$ BenouKat · Feb 20, 2018 at 02:35 PM 0
Share

Hi Benou$$anonymous$$at,

Thanks a lot for such a quick response and I have attached a pic to show you what's happening and please let me know if you still need me to do deep profile

Thanks & Regards, Bhanualt text

gui-repaint.jpg (139.6 kB)
Show more comments

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

11 People are following this question.

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

Related Questions

Filling image without compromises 0 Answers

How to force Unity to Repaint an EditorWindow? 1 Answer

Work around for, "Getting control 0's position in a group with only 0 controls when doing repaint?" (Trouble Spot Spotted) 0 Answers

OnGui Function help 1 Answer

Draw movetool gizmo in OnDrawGizmos() 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