Is there a way to run script when adding object to scene?

I’m child-ing a prefab (containing a trigger sphere collider) onto certain objects in my scene, and I’ve figured out a way to set the collider radius in accordance with the parent’s scale, but am wondering if there’s a way to have this automatically set when I drag the prefab onto the object, rather than at runtime?

EditorWindow.OnHierarchyChange perhaps? Of course that means you would have to have some EditorWindow open.