Hello, There's a value called SerializedProperty.prefabOverride for every serializable property in unity. A property such as a float inside a script. That property is what makes the value "Dirty". It makes the value look bold on the inspector. When it is bold, if you change the value of the prefab of the instantiated object, the value of that object would not change.
This is good. However, as we edit our levels in the scene, random values would undirty themselves, but their values are clearly different from their prefab coutnerpart. You would imagine, when we changed a value in the prefab, all of the instances of that prefabs's values which were undirty changed as well. A big problem is that it is very hard to reproduce.
I was able to set the variables to dirty forcibly by setting the SerializedProperty.prefabOverride to true and calling ApplyModifiedProperties() on the serializableObject. However, we don't want this as it would set every variable to dirty. Since Unity may not fix this problem for some time as the problem is hard to reproduce, here's the question.
How can we know if a variable is different from its prefab's without using SerializedProperty.prefabOverride?