private void GetInstancedOverrides() { InstancedObjs.Clear(); foreach (var childTransform in GetComponentsInChildren<Transform>()) { if (childTransform.gameObject.name.Contains("Instance")) { InstancedObjs.Add(childTransform); } } FixedInstancedOverrides(); } private void FixedInstancedOverrides() { foreach (var childTransform in InstancedObjs) { #if UNITY_EDITOR PrefabUtility.RevertPrefabInstance(childTransform.gameObject, InteractionMode.UserAction); #endif } Debug.Log("Fixup fired"); }
The issue is this fires to early and breaks rebuilds or recooking of the HDA. i used editor coroutines to delay running these functions which does work but I wanted to ask if there was a good way to latch onto the event of the HDA to say the cook or rebuild had finished?