Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIFlippable.cs ArgumentOutOfRangeException #133

Closed
SimonDarksideJ opened this issue Apr 25, 2022 · 7 comments
Closed

UIFlippable.cs ArgumentOutOfRangeException #133

SimonDarksideJ opened this issue Apr 25, 2022 · 7 comments

Comments

@SimonDarksideJ
Copy link
Contributor

Issue created by <unknown> as Bitbucket Issue #​133 on 2017.04.07 23:56.
I get this error when move to 5.6.

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEngine.Vector2].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
UnityEngine.UI.VertexHelper.PopulateUIVertex (UnityEngine.UIVertex& vertex, Int32 i) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Utility/VertexHelper.cs:65)
UnityEngine.UI.Extensions.UIFlippable.ModifyMesh (UnityEngine.UI.VertexHelper verts) (at Assets/unity-ui-extensions/Scripts/Effects/UIFlippable.cs:48)
UnityEngine.UI.Graphic.DoMeshGeneration () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:388)
UnityEngine.UI.Graphic.UpdateGeometry () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:374)
UnityEngine.UI.Graphic.Rebuild (CanvasUpdate update) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:335)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:149)
UnityEngine.UI.ScrollRect:LateUpdate()

@SimonDarksideJ
Copy link
Contributor Author

On 2017.04.10 20:17, Gustavo Bogarín commented:
I have this problem too, the error appears in this line

                verts.PopulateUIVertex(ref uiVertex, i);

I couldn't find much information about that method so I'm stuck here, but what I can tell is that the array is empty because the exception is raised when the index is 0.

@SimonDarksideJ
Copy link
Contributor Author

On 2017.04.13 13:14, @SimonDarksideJ commented:
Seems that line should have a null check then. Looking in to it now.

@SimonDarksideJ
Copy link
Contributor Author

On 2017.04.19 16:06, Gustavo Bogarín commented:
Any news on this? verts ins't null apparently.

@SimonDarksideJ
Copy link
Contributor Author

On 2017.04.19 16:28, @SimonDarksideJ commented:
Looking into it amongst the other additions/fixes as part of the next update

@SimonDarksideJ
Copy link
Contributor Author

On 2017.04.21 19:22, Gustavo Bogarín commented:
I think I figured out how to solve it, apparently the problem isn't the script itself, but a combination of components, in my case it was the Outline placed above the Flippable, once I moved down the Outline the problem was gone, the component also modifies the mesh, so maybe it has to do with the order in which the events are being called. But this wasn't a problem in 5.5, something changed.

@SimonDarksideJ
Copy link
Contributor Author

On 2017.07.02 15:36, @SimonDarksideJ commented:
Fix for UIFlippable when used in combination with other BaseMeshEffects
Unity is very fussy about the order now, so script updated to ensure it's above other base mesh effects on Validate.
(can't solve for stupid if you reorder manually, so updating docs)

Resolves #133

Referenced by af1f9be

@SimonDarksideJ
Copy link
Contributor Author

On 2017.07.02 15:36 @SimonDarksideJ modified issue:
status changed newresolved

SimonDarksideJ pushed a commit that referenced this issue Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant