Hi there,
I am in trouble with unknown rare error in NGUI.
I has looked for the problem several days, but I have no more idea.
These are logs from Unity below.
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index at System.Collections.Generic.List`1[UIWidget].get_Item (Int32 index) [0x0000c] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633
at UIPanel.UpdateWidgets () [0x00094] in C:\Projects\PachinkoRPG\Assets\Libraries\NGUI\Scripts\UI\UIPanel.cs:1545
at UIPanel.UpdateSelf () [0x0000c] in C:\Projects\PachinkoRPG\Assets\Libraries\NGUI\Scripts\UI\UIPanel.cs:1237
at UIPanel.LateUpdate () [0x00035] in C:\Projects\PachinkoRPG\Assets\Libraries\NGUI\Scripts\UI\UIPanel.cs:1198
(Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs Line: 633)
UIPanel.cs
void UpdateWidgets()
{
//..... SKIP...
int frame = Time.frameCount;
for (int i = 0, imax = widgets.Count; i < imax; ++i)
{
UIWidget w = widgets[i]; // <----- ERROR! LINE 1545
I think widgets.Count,its actual list size, was changed while the for loop was in progress.
Because imax value is never changed, there must be an error
if one element of widgets is removed while in progress of for loop.
Please let me know any tips or clue for this problem.
Thanks.