Quantcast
Channel: Latest Questions by LaireonGames
Viewing all articles
Browse latest Browse all 12

Detecting when a component has been pasted onto an inactive object

$
0
0
Hey everyone, As the title says. I am creating a custom inspector that works by creating and hiding subcomponents. So when I use the context menu to copy component (by right clicking on it in the inspector) and paste it onto a new object it will detect its on a new object and clone the subcomponents. This works great but not when I paste the component onto a gameobject that is inactive. In short: Using the ExecuteInEditMode tag are there any methods that will run whilst the object is disabled? (Already tried Start, Awake, OnEnable, OnDisable and Update. None seem to be called) Are there any methods I could hook into when Unity pastes a new component? My backup alternative is to have something scan the currently selected object every frame (whilst in edit mode) but I would rather avoid that purely from a design point of view. Any thoughts on the subject? Cheers! Jason

Viewing all articles
Browse latest Browse all 12

Trending Articles