com.unity.uiextensions icon indicating copy to clipboard operation
com.unity.uiextensions copied to clipboard

Infinite HSS Current Page wrong

Open SimonDarksideJ opened this issue 3 years ago • 6 comments

Issue created by Matt as Bitbucket Issue #​254 on 2018.07.23 18:01. When using the UI Infinite Scroll inside the HSS, the current page for the HSS is incorrect. Most likely due to the moving of child elements, but I'm unsure how to fix. Steps to recreate:

  1. Add HSS to scene with several elements (make sure to have fix for Infinite scrolling)
  2. Add UI Infinite Scroll to HSS object
  3. Create a debug statement to print the current page, and call it on the HSS's "On Selection Page Changed End Event" The printed object id or name is incorrect from the actual object.

SimonDarksideJ avatar Apr 25 '22 19:04 SimonDarksideJ

On 2018.07.25 13:31, @SimonDarksideJ commented: A couple of things on this issue.

  1. You are aware the Current page is a zero indexed array? meaning page 1 is actually page 0
  2. Are you placing a HSS within a HSS with infinite scroll (2. Add UI Infinite Scroll to HSS object 3) or something else.

A sample scene just using the extension components would be helpful to test with (just the scene file and any scripts)

SimonDarksideJ avatar Apr 25 '22 19:04 SimonDarksideJ

On 2018.07.25 13:40, Matt commented: Apologies, I am unable to set up a test scene at the moment. However, I was able to find a 'fix' over the weekend. I only say fix because it fixed my specific issue but I am unaware if it caused any unintentional issues. I simply removed the transform.setaslastchild() (and its counterparts) from the UI_Infinite Scroll script under the horizontal snap scroller and that seems to have fixed all of my issues and I can now correctly grab the current object.

SimonDarksideJ avatar Apr 25 '22 19:04 SimonDarksideJ

On 2018.07.25 14:04, @SimonDarksideJ commented: Hmm ,sounds like some unintentional byproduct between the HSS and Infinite scroll.
The Infinite scroll author has suggested a new script to add snapping to the Infinite scroll, however I've not tested it yet https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Infinite%20Scroll%20Snap

SimonDarksideJ avatar Apr 25 '22 19:04 SimonDarksideJ

Any update on this? Will this be fixed?!

ROBYER1 avatar Mar 19 '24 15:03 ROBYER1

Thanks for the poke, it is scheduled for the next release 2.3.3, but no firm date as to when this will be sorry. PR's are welcome though.

SimonDarksideJ avatar Mar 19 '24 15:03 SimonDarksideJ

Thanks for the poke, it is scheduled for the next release 2.3.3, but no firm date as to when this will be sorry. PR's are welcome though.

Is there anything I can pinch the current fix landing in 2.3.3 to try locally?

ROBYER1 avatar Mar 19 '24 16:03 ROBYER1