Search Issue Tracker
By Design
Votes
0
Found in
5.6.0p1
Issue ID
905460
Regression
No
Adding new elements to the Array, it ignores declared values in the script
If you have a property that is an array, when adding a new entry (changing the Size displayed in the Inspector), the constructor of the new object will run, but all properties of the array will be 0 or empty.
To reproduce:
1. Download attached project "NullProperty.zip" and open in Unity
2. Open "Scene" scene
3. Create new Game Object and add the ArrayProperty component
4. Change ArrayProperty component Size in Inspector window
Expected result: The Console will print out "Made an Inner! Current Values = {A=0.1 B=0.1 S=str}" for every new entry you add in Inspector and
A property will show "0.1" value, B property will show "0.1" value and S property will show "str" value
Actual result: The Console will print out "Made an Inner! Current Values = {A=0.1 B=0.1 S=str}" for every new entry you add in Inspector but all values of properties will be 0 or empty
Reproduced on Unity 5.5.3p2, 5.6.0p3 and 2017.1.0b2
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Character spacing value is not applied when using a specific font asset
- [Android][IL2CPP] Player crashes on __memcpy_aarch64_simd+276 when invoking native code via a plugin on some ARM64 Android devices
- [Android]Resources fail to load when the AAB build contains a large Addressables Bundle
- Unity is loading internal version of SharpZipLib instead of local version
- The Context Menu items are ordered incorrectly
Add comment