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 Demigiant · Oct 10, 2012 at 02:48 PM · unityeditorinspectorcustom editorcustom inspectorrepaint

Refreshing custom Inspector window while playing

Hello,

I need to have an Inspector window constantly refreshed while the Editor is playing (to show some data). How can this be achieved?

I used to rely on calling Repaint within OnSceneGUI, but that works only if the Scene window is visible.

Thanks

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 yoyo · Dec 04, 2012 at 06:06 AM 1
Share

See my answer to http://answers.unity3d.com/questions/333181/how-do-you-force-a-custom-inspector-to-redraw.html for another alternative.

avatar image Demigiant · Dec 04, 2012 at 10:00 AM 0
Share

Thanks for that. Now I wonder why I didn't think about it before :B

avatar image yoyo · Dec 04, 2012 at 04:17 PM 0
Share

That's odd, I just noticed your name shows up one way in the "signature" for questions and answers, but differently for comments. Looks like a bug.

avatar image Demigiant · Dec 04, 2012 at 05:07 PM 0
Share

Yup, I usually point that but this time I forgot, and it seems it happens to other people too. Quite a big bug for a community like this.

avatar image yoyo · Dec 04, 2012 at 05:59 PM 0
Share

Easy "fix" -- edit your profile and make real name and screen name both the same :-p

Show more comments

1 Reply

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

Answer by Demigiant · Oct 10, 2012 at 06:20 PM

SOLVED. A custom Inspector window will automatically refresh if one of its target's serialized properties change.

When playing, you can set a coroutine to change a property continuously with the desired interval, thus automatically refreshing the Inspector (you'll want to check Application.isEditor first, to avoid starting a useless coroutine while not in the Unity Editor).

Comment
Add comment · Show 1 · 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 Estecka · Jun 19, 2017 at 02:29 PM 0
Share

There's a subtlety to this: If a serialized property is not naturally "inspectable" (eg: it is using custom accessors), then updating this property will not cause the inspector to refresh.

I am in a situation where all the relevant property use accessors; despite them being shown through custom inspectors, the still inspector will not automatically refresh.

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

Make a custom inspector that shows a group of variables in form of list 2 Answers

Custom Inspector "Multi-object editing not supported" 4 Answers

How to Hide/Show List or Array in the inspector based on a variable? 0 Answers

Should I use Inspector or custom editor window? 1 Answer

Show texture (image box) in inspector with custom editor [C#]? 3 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