Search Issue Tracker
Newly declared arrays become null when attached to gameObject script is edited
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Tabbed headers in editor windows need a style update
- [Android][IL2CPP] App crashes after executing Application.Quit
- [iOS] ReplayKit.APIAvailable returns 'false' on the first call on iOS 13 devices
- Texture preview can be clicked through
- [Progress] Progress bar does not revert to unresponsive status after another task completes