An error message would show up everytime I made a change to a prefab, including changing values in the inspector, or enabling / disabling prefab and its components.
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.PrefabImporterEditor.IsTargetAsset (UnityEngine.Object obj) (at <5d5ebefe97114215928ac1d9cd096522>:0)
UnityEditor.PrefabImporterEditor.ObjectChangeEventPublished (UnityEditor.ObjectChangeEventStream& stream) (at <5d5ebefe97114215928ac1d9cd096522>:0)
UnityEditor.ObjectChangeEvents.InvokeChangeEvent (System.IntPtr events, System.Int32 eventsCount, System.IntPtr payLoad, System.Int32 payLoadLength) (at <5d5ebefe97114215928ac1d9cd096522>:0)
If in debug mode, it would stop at this point:
The cause might be that I forced quit the application when changing a value in the prefab (I thought unity isn’t responding, but it is actually because I opened debug mode.
The same problem appears to happen in my other projects (with different version of unity), and isn’t happening with the same project in other devices.
I tried to rebuild the project, and even uninstalling unity and unity hub, and reinstalling them, but the error message keeps coming up. It has been annoying me as it would stop the debug, every time I made a change to a prefab.