Skip to content

BUG: localPosition gets NaN error in ScrollSnap #508

@SimonDarksideJ

Description

@SimonDarksideJ

Unity UI Extensions Bug Report

Describe the bug

I'm trying to use ScrollSnap, but it produces error:
transform.localPosition assign attempt for 'Content' is not valid. Input localPosition is { 0.000000, NaN, 0.000000 }.

This happens in:
ScrollSnap.cs > LateUpdate() on the line
_listContainerTransform.localPosition = Vector3.Lerp(_listContainerTransform.localPosition, _lerpTarget, 7.5f * Time.deltaTime);

I have vertical Scrollview with Vertical Layout Group and Content Size Fitter on Content. I also have buttons for Up and Down movement.

I get this error every time if I'm at the top, click down button and then try to scroll up (or the reverse, starting on the bottom, clicking up button and scrolling down). I can give more information if this isn't enough.

Sample and details here:
#452 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions