internal static void RevertPrefabAddedComponent(object userData) { Component obj = (Component)userData; PrefabUtility.RevertAddedComponent(obj, InteractionMode.UserAction); EditorUtility.ForceReloadInspectors(); }