Hi, is it possible for a function get to called every frame in edit mode?
I see lots of posts about updates, but it’s always only when something is edited.
I need this update call for a series of complex RenderTextures over several frames, and I would like to do this in edit mode. I can’t use a Co-routine because I’m calling rendering code.
Thanks,
Dave.
Thanks guys, the first answers looks promising but I’m not sure about Delegates yet, and the code is confusing at the moment for me(!), but it looks like the correct direction.
The second link uses:-
"
- Update is only called when something in the scene changed.
- OnGUI is called when the Game View recieves an Event.
- OnRenderObject and the other rendering callback functions are called on every repaint of the Scene View or Game View.
"
Which is not what I wanted, sorry. I needed something that updated on it’s own, without the user doing anything.
Can I ask why you want this in the editor? I only ask because that’s usually a very bad idea. You can easily make editing your game scene difficult or impossible.
OK, when the user edits something, it goes away and renders a texture based on this edit, it’s an expensive edit so it’s divided up in to 128 individual tasks, and then stops.
I have the static update working now, thanks.
Scratch that, I can’t use the EditorApplication.update thing as it get’s called all over the place, and I specifically needed a render pipe call.
1 Like