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 semiessessi · Jan 09, 2014 at 03:11 PM · editorrenderingdebug

How to animate (every editor frame) debug rendering when editor paused?

I've found OnDrawGizmos() - is there any equivalent which is called every frame?

I've had a look here: http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.html

There is nothing obvious in the documentation and I'd rather not have to set up a coroutine or something strange to do this... I'm not even sure if that would work anyway due to the low quality of documentation in this area and the weird and wonderful implementation of coroutines.

(Also, Debug.Line seems to be dangling lines atm when I set the lifetime on them to anything. The value seems to not be respected... I'm fairly certain this used to work correctly given the nature of code I see using that function.)

EDIT: for the record a coroutine does not seem able to solve this... nothing seems to be drawn regardless of how I set one up

EDIT2: the lines don't respect real time, they respect game time, so pausing the game allows them to pile up.

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 frarees · Jan 11, 2014 at 01:33 PM

If you create a custom editor for your behavior you can use OnSceneGUI. However that callback is not going to be called every frame but every time an event has been caught on the scene view while your behavior's inspector is active (works the same way as OnGUI does). Use Repaint to send a Repaint event to OnGUI and OnSceneGUI. Call it either when you make do something on OnGUI and want to see the scene updated or you can even do it every editor update registering a method that uses Repaint on EditorApplication.update

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 semiessessi · Jan 12, 2014 at 01:33 PM 0
Share

i will have to try this out and let you know how i get on. thanks for the suggestion

avatar image semiessessi · Jan 12, 2014 at 04:28 PM 0
Share

whilst i have not followed your precise suggestion EditorApplication.update gives me what I need. :)

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

19 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

Related Questions

Is it possible to extend the playing and debugging process? 0 Answers

Script with in-game and in-editor part 1 Answer

How to make MonoDevelop to persit on Unity editor attachment? 0 Answers

Why does the app run fluent in the editor but lags when it's built? 2 Answers

Unity Editor Switchable Graphics Rendering Error 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