Repository navigation
|
Existing managed-reference values can become missing after renaming a class or namespace, moving the type to another assembly, or adding or changing an assembly definition. How should I migrate the type so existing scenes, prefabs, and assets can still resolve their saved values? |
Replies: 1 comment
|
Unity identifies a serialized managed-reference type by its class name, namespace, and assembly name. Changing one of these can prevent existing data from resolving to the type. Moving a script into an assembly definition can change its assembly name even when the class name stays the same. For a type migration, apply |
Unity identifies a serialized managed-reference type by its class name, namespace, and assembly name. Changing one of these can prevent existing data from resolving to the type. Moving a script into an assembly definition can change its assembly name even when the class name stays the same.
For a type migration, apply
UnityEngine.Scripting.APIUpdating.MovedFromAttributeto the destination type and supply the former type identity. Verify the migration with existing scene, prefab, or asset data before saving over it.