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
1
Question by Pangamini · Nov 06, 2014 at 12:33 PM · guipopuprepaint

Custom EditorGUI widget should invoke EditorWindow.Repaint

I am trying to create a custom popup method that will work similar to EditorGUI.Popup, but with extended functionality (search bar etc). The problem i have is, that selecting an item won't send any message to the window / gui context that renders the popup, which means its effect won't be immediate (noone will read the changed value, noone will get the EndChangeCheck() true immediatelly). I've decompiled the EditorGUI.Popup and it seems like it's done using GUIView instance, which i can't obtain because it's all internal classes (which drives me nuts, how can i extend GUI if everything is interned / sealed? )

Is there some way how to force repaint if i don't have a reference to the window that draws my GUI? (I can't have it, it may be used in inspector, custom window, nested inside another inspector / editor / anywhere else)

Comment
Add comment · Show 4
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 Pangamini · Jan 19, 2015 at 10:50 AM 0
Share

mean Bump

avatar image peaj_metric · Oct 22, 2015 at 12:47 PM 0
Share

I have the exact same problem atm. I'm building a treeview and dont want it to need a reference to the Window. Additionally I cannot focus/blur my custom drawn nodes properly because I don't know how to check which other object currently has focus. There is a lot of necessary stuff hidden in the internal classes. Could you get it to work now or could anybody else answer this question?

avatar image Pangamini peaj_metric · Oct 22, 2015 at 12:49 PM 0
Share

Well i gave my widget a delegate to Repaint as well as flag if the window is focused or not... found no other solution

avatar image peaj_metric · Oct 22, 2015 at 01:30 PM 0
Share

I found a workaround for my case. Because I need to repaint the window as a reaction to a click I can suppose the window has focus and use EditorWindow.focusedWindow.Repaint(); $$anonymous$$aybe it also suits your case.

However I could not fix the focus issue. I still need 2 methods of my treeview specifically called from the window on Focus or LoseFocus

0 Replies

· Add your reply
  • Sort: 

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

27 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How completly remove GUI.Repaint() calls ? 1 Answer

GUI Popup problem…! 1 Answer

button drawn last not triggered 0 Answers

Text pop up when mouse over gui button 2 Answers

problem with a pop-up window 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