Search Issue Tracker
Won't Fix
Votes
1
Found in
2019.4
2019.4.2f1
2020.2
Issue ID
1278731
Regression
No
Object references are not loaded after you git checkout to another branch
How to reproduce:
1. Extract attached "git.zip"
2. In the newly created folder run these commands: "git reset --hard" and "git checkout a"
3. Open scene "SampleScene" in the appeared unity project
4. Select object: "Scene object"
5. Run the command: "git checkout b"
6. See: "Sample" script on GameObject "Scene object" has 2 fields (Component and Go)
Expected Behavior: These 2 fields have references attached to them
Actual Behavior: They are both nulls
Reproducible with: 2019.4.11f1, 2020.1.6f1, 2020.2.0b3
Could not test with: 2018.4 due to script compilation errors
Note: If you reload the scene - these fields regain references
-
nijatali1122
Sep 19, 2020 13:48
this is what i was looking for!! finally i got it!!!thanks for sharing!!!
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
- Variable is set to a different value from the selected enum value in the Editor dropdown
- TreeView Child display toggle styling becomes reversed when clicking and dragging it
- Null is returned when using FocusOutEvent.relatedTarget
- Unity_BaseInstanceID is always zero when rendering multiple meshes and instancing with the same buffer
- UI Document button's text does not resize relatively when size in percentage (%) is used
Resolution Note (2020.2.X):
When the scene is loaded any redundant data stored in the scene for valid monobehaviours is discarded. It might be that the script is changed and the redundant data could suddenly be applied but the only to robustly do this would be to ask the user to reload the scene, potentially having to discard unsaved changes. It would also suddenly mean that any script changes would ask the user to reload the scene which would be a problem when iterating on a script.