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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment