- Home /
Track passing time in EditorScript
What is the proper way to handle delayed events in an EditorScript?
I come across this problem all the time, but the current project I am working on involves automatically regenerating a computationally intensive mesh after the user tweaks any parameters for it in it's custom editor. I don't want to regenerate it hundreds of times when they are playing with a slider, for example, so I need to keep track of passing time and regenerate the mesh only every second or so if necessary.
When the editor isn't playing and thus Time.time isn't available, what is the correct way to go about doing this?
Answer by efge · Mar 23, 2011 at 06:52 AM
There is an example for Time in the Editor in the reference for EditorApplication.timeSinceStartup.
Ah, thank you very much! Can't believe I missed this.
Your answer
Follow this Question
Related Questions
Editor Playmode takes a while to load 0 Answers
problem with the digits of my timer 1 Answer
EditorWindow texture effected by Playmode Color Tint 1 Answer
"add selected" editor script 1 Answer