Hello Guest

Author Topic: tk2dUIScrollableArea - Input localPosition is { 0.000000, NaN, 0.000000 }.  (Read 5592 times)

cloudchen

  • Newbie
  • *
  • Posts: 16
    • View Profile
below is the error message I got when try to move whole ScrollableArea down a little bit in script.

Code: [Select]
transform.localPosition assign attempt for 'Content' is not valid. Input localPosition is { 0.000000, NaN, 0.000000 }.
UnityEngine.Transform:set_localPosition(Vector3)
tk2dUIScrollableArea:set_ContentContainerOffset(Vector3) (at Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs:212)
tk2dUIScrollableArea:SetContentPosition() (at Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs:232)
tk2dUIScrollableArea:set_Value(Single) (at Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs:110)
tk2dUIScrollableArea:ContentLengthVisibleAreaLengthChange(Single, Single, Single, Single) (at Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs:484)
tk2dUIScrollableArea:set_VisibleAreaLength(Single) (at Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs:41)
ScrollableAreaController:AdjustScrollableAreaLengths(Single) (at Assets/Scripts/ShoppingCart/ScrollableAreaController.cs:97)
ScrollableAreaController:InitGoodsList(GoodsWrapper) (at Assets/Scripts/ShoppingCart/ScrollableAreaController.cs:52)
<GetClothesGoodsFromServer>c__Iterator1E:MoveNext() (at Assets/Scripts/ShoppingCart/Buttons/TabButtonAll.cs:54)

Below is the code snippet where I called the method:
Code: [Select]
void AdjustScrollableAreaLengths (float contentLength)
{
                //scrollableArea is tk2dUIScrollableArea area.
scrollableArea.ContentLength = contentLength;

if (currentTab == Tabs.All) {
scrollableArea.VisibleAreaLength = VISABLE_AREA_LENGTH_WITH_SUBTABS;
// transform local position
float x = scrollableArea.transform.position.x;
float z = scrollableArea.transform.position.z;
Vector3 modified = new Vector3(x, 1054.0f, z);
gameObjectScrollableArea.transform.position = modified;
}

}

Have no idea about this error reported by Unity. Could you please help me on this issue?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Are you changing the y value?

If you can, email me a repro case of this to support at unikronsoftware.com. Trying to reproduce this on my end will be a lot of effort, especially since this is likely caused by the configuration of the scrollbar.

cloudchen

  • Newbie
  • *
  • Posts: 16
    • View Profile
Yes, I am trying to change the y value of the GameObject which hold the scrollableArea and then encountered this issue.
I don't use scrollbar hence the reference of the scrollbar is none. I will mail you as much as possible I can provide as soon as possible.

Update: Have sent the sample project to
« Last Edit: August 01, 2013, 03:07:46 pm by unikronsoftware »