Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.18f1
2021.3
2022.1
2022.2
Issue ID
1418497
Regression
No
"This Object contains SerializeReference types which are missing." warning appears when renaming the class or namespace
Reproduction steps:
1. Open the attached "SerializeReference_1209838.zip" project
2. Open the "SampleScene" Scene
3. Go to Hierarchy > Test > Reference and see that the value of the "Value" variable is "2"
4. Change the name of the "TestBehaviour" class or "MyNS" namespace in "SerializeReferenceTest.cs" and "TestBehaviour.cs" scripts
5. Go to Hierarchy > Test > Reference
Expected result: The value of the "Value" variable is "2"
Actual result: The value of the "Value" variable is "0" or "This Object contains SerializeReference types which are missing." warning appears, and the "Reference" field is not displayed
Reproducible with: 2019.4.37f1, 2020.3.33f1, 2021.3.0f1, 2022.1.0b14, 2022.2.0a10
Notes:
- If you open the "Test.prefab" asset after the 4th step, you will see that the reference is laid out as (renamed class or namespace are not updated):
references:
version: 1
00000000:
type: {class: TestBehaviour, ns: MyNS, asm: Assembly-CSharp}
data:
Value: 2
- The warning message appears in 2021.2.0a12 and above
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- After converting a Built-in project to URP render texture related errors are spammed that can lead to Game view being rendered on top of Scene view
- UI Builder slider value lags and stutters when sliding/modifying certain property values
- "Reset UI Builder Layout" functionality inconsistently changes Canva Size when "Match Game View" is enabled/disabled
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
Resolution Note (2022.2.X):
When using [SerializeReference], class rename are not handled automatically. One way around the issue is to use
UnityEngine.Scripting.APIUpdating.MovedFromAttribute
More specifically, using the provided project, you can rename the behavior and successfully load the data using [MovedFrom]
[MovedFrom(false, null, null, "TestBehaviour")]
[Serializable]
public class TestBehaviour1
...