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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment