Search Issue Tracker




Found in


Issue ID




Newly declared arrays become null when attached to gameObject script is edited

Inspector Functionality


To reproduce:

1.Download and open attached project
2.Attach Behav script to Main Camera object
3.Open Behav script and uncomment declaration of b array(5th line)
4.Save changes and check values of b array in the inspector

Expected result: Size of b array being 5 and all elements of the array are visible in the inspector. Elements being fully accessible.
Actual result: Size of b array is 0. There aren't any visible array elements. These elements are not accessible trough the editor.

Reproduced with: 5.5.0f3, 5.5.0p3, 5.6.0b3
Not reproduced with: 5.4.3p3, 5.3.7p2, 5.2.5f1

Workaround: attach script to the object when both arrays are uncommented.

Note: b array values are null, even though b array is declared in script with 5 elements.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.