ProBuilder objects in prefabs break if you call PrefabUtility.RevertPrefabInstance

ProBuilder objects appear to have a major problem with calling PrefabUtility.RevertPrefabInstance to revert a prefab instance. This doesn’t happen if you click “Overrides → Revert All” in the inspector for the prefab. But calling PrefabUtility.RevertPrefabInstance with break the object.

For example, I made a simple prefab containing a default PB cube:

Now, if I call PrefabUtility.RevertPrefabInstance too revert the TestObj prefab, this is the result:

The object disappears, there’s now a strange [none] (Mesh Filter) object on the PB object, and both the PB Mesh Filter and the Mesh Collider has lost their reference to the Mesh.

Now, although the object is “broken”, it’s recoverable. If I switch to a different scene and come back, the object will be restored. Or, I can select the object, switch to Vertex mode, and I can see the verts. If I move one of the verts, the object is restored:

Is there something you’re expecting people to call on PB objects after calling PrefabUtility.RevertPrefabInstance? Is there some way to tell PB Objects to fix themselves?

FWIW, it looks like the bug only occurs when RevertPrefabInstance is called with InteractionMode.AutomatedAction. Things seem okay if you pass InteractionMode.UserAction instead. Not sure why that would matter, but it seems to be the workaround I needed for now.

first thing i notice is the size is 0,0,0

Probably due to the mesh being missing/None when this occurs.