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
- The cursor moves into wrong place when renaming folder/asset
- Assertion error "(dx - width < padding) || (dy - height < padding)" when using Pack Preview
- [Memory Profiler] The EntryType.NativeAllocationSites_MemoryLabelIndex of snapshots only reports -1 or 0 instead of the MemLabel used for allocations made from any call site.
- [Vulkan] Artifacts appear in the Player when using Screen Space shadows with orthographic camera
- Errors OnGUIDepth changed & GUIUtility:ProcessEvent when opening Textures with Third Party App
Add comment