- Home /
Is there any event or delegate that is called with OnValidate() ?
I try to implement system that will make possible to connect Components with related for them editor-only Game Object - for showing and controlling some state of Component visually (geometry forms, joints, et.c). I know that ordinary system for doing this is Gizmos Draw, but Gizmos have no Z-sorting and is not so functional as Game Objects.
.
Mentioned editor-only objects should track in-Editor changes of connected Components state with as little amount of glue code as possible. I thought there is some delegate or event like OnValidate() that allow subscribe for Component state changes in Editor Mode. But it looks like it's not possible.
.
So it looks like the only way is to make some utility class (something like "MonoBehaviourWithEditMode"), inherit it from MonoBehaviour and implement event there by ourselves. Then this class may be used as base for Components that what to notify somebody about changes?... Bulky and not flexable.
.
So, the question: is there some more sutable way to implement wanted functionality?