Skip to content

Commit d90db50

Browse files
authored
Update README.md
1 parent e7ac78d commit d90db50

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,18 @@ The `SubclassSelector` attribute supports types that meet the following conditio
129129
- Not generic
130130
- Not unity object
131131
- Serializable attribute is applied.
132+
133+
134+
## ❓ FAQ
135+
136+
### If the type is renamed, the reference is lost.
137+
138+
It is a limitation of `SerializeReference` of Unity.
139+
140+
When serializing a `SerializeReference` reference, the type name, namespace, and assembly name are used, so if any of these are changed, the reference cannot be resolved during deserialization.
141+
142+
To solve this problem, `UnityEngine.Scripting.APIUpdating.MovedFromAttribute` can be used.
143+
144+
Also, [this thread](https://forum.unity.com/threads/serializereference-data-loss-when-class-name-is-changed.736874/) will be helpful.
145+
146+
https://forum.unity.com/threads/serializereference-data-loss-when-class-name-is-changed.736874/

0 commit comments

Comments
 (0)