public static extern bool IsPersistent(Object target); [MethodImpl(MethodImplOptions.InternalCall)]
static bool CreatePrefabVariantValidation() { var go = Selection.activeGameObject; return(go != null && EditorUtility.IsPersistent(go)); }