Positional Lag in Nested UIBlock Hierarchy #259
justinmajetich
started this conversation in
Bugs
Replies: 1 comment
-
We believe this to be a bug on our end, so I'm moving it over to "Bugs" while we investigate. Thank you for bringing this to our attention and for the details/videos to help us clearly understand the issue you're experiencing! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm dealing with "lag" in the movement of a UIBlock hierarchy beneath but not included in a parent UIBlock hierarchy. The issue is documented in a video linked below.
Here is the structure of an item which is the direct child of a scrollable GridView. The AssetPreview GameObject intentionally creates a gap in the UIBlock hierarchy. A second UIBlock hierarchy begins with PreviewClipMask - the position second hierarchy visibly lags when the overall AssetLibraryItem2D is moved via Scroller. Here's a visual explanation:
My thought was this "lag" must be the result of the Transform position and UIBlock.Position being out of sync at the end of a frame in which the menu item has moved. Something like, both ItemView and PreviewClipMask's UIBlock positions are calculated and set at the end of a given frame; however, this updated position isn't reflected in PreviewClipMask's Transform until the next frame. I haven't completely wrapped my head around it, but that's my general impression of what's happening. So, I tested a forceful solution, setting the UIBlock.Position manually on Update for the UIBlock attached to PreviewClipMask:
The result really confuses me. Positional lag for items belonging to the two outer columns of the GridView is resolved; however, lag persists for items of the center column.
Both the initial issue and the partial fix are demonstrated in this video: https://youtu.be/48acEJW1cOI
I can understand how a lag in accurate position setting could be expected behavior for my given hierarchy of UIBlocks. That being said, if anyone has a better solution than what I've outlined above, please do share. However, what I really can't understand is why the hack I've implemented only fixes my issue for items withing certain parts of the GridView. Thanks in advance for any help!
Beta Was this translation helpful? Give feedback.
All reactions