Search Issue Tracker
Fixed in 2020.2.X
Votes
4
Found in
2019.3
2019.3.4f1
2020.1
2020.2
Issue ID
1226589
Regression
No
[SerializeReference] Array type is incorrect when it is serialized in a class that is serialized in another class
How to reproduce:
1. Open attached project "Case_1226589" and load SampleScene
2. Select the "TestObject" GameObject in the Hierarchy
3. Observe how variables of MonoClass Script are serialized in the Inspector
Expected result: variable "ThisIsFilledWithInts" is serialized as an array of "ArrayData" type
Actual result: variable "ThisIsFilledWithInts" is serialized as an array of "DataClass" type
Reproducible with: 2019.3.6f1, 2020.1.0b2, 2020.2.0a3
Could not test with: 2017.4.38f1, 2018.4.19f1 ([SerializeReference] not available)
Note: MonoClass serializes a reference to DataClass which serializes a reference to an array of ArrayData. ArrayData only has a public int variable declared
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
- WebGL build is missing "malloc" and "free" functions when passing "-sERROR_ON_UNDEFINED_SYMBOLS=0" to emscriptenArgs
- UI Toolkit Slider element is not controlled correctly when using a gamepad controller
- Audio output is of low volume when the Speaker Mode is set to Quad and the Audio Source in the Scene is behind the Camera
- A user gets an error "Failed to import package with error: Cannot import package in play mode." when tries to import TMP essentials, examples or extras
- The Particle System's ShowOnlySelected function doesn't work when toggled via a shortcut
yhso
Apr 28, 2021 03:56
I Have The Bug too.
[SerializeReference]
List<AAA> aaa;
.......
class AAA{}
class AAA1 : AAA
{
public BBB bbb;
}
class BBB
{
public List<int> ccc; //this will bug
}