- Home /
SceneView render begin or end
Hi, is there a way to know from an Editor script when the SceneView render begins (or ends)?
I am rendering previews of animation paths from an Editor script (using the AnimationUtility) and would like each path to be a different color. For this I need to know which path is rendered first, second, third, etc. and have this be consistent each time the SceneView renders.
I am using the following to render [DrawGizmo(GizmoType.InSelectionHierarchy | GizmoType.NotInSelectionHierarchy)] static void DrawAnimatorPath(Wave script, GizmoType gizmo) { // rendering here }
I've tried using the following delegate but I only hit it once, not every time the SceneView redraws. SceneView.beforeSceneGui += InitScene;
What I need is some function that I know gets called first (or last) every time the SceneView gets redrawn so I can reset the color to the first color in my list.
Thanks.
Your answer
Follow this Question
Related Questions
How to get the top most GameObject selected in Editor 0 Answers
render order/ multipass shaders (hidden surface shader path) 1 Answer
Render camera in EditorWindow 1 Answer
Can't move GameObject in Scene view with Unity Components attached 2021.2.2f 0 Answers
Grass (terrain detail mesh) show in editor, not in build 3 Answers