Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Simon (Darkside) Jackson
@SimonDarksideJ
The Reorderable List, is only intended as a drag and drop interface and is designed that way @JustWastingTime , the component you're looking for is the "UIScrollToSelection" Component. The docs page was missed in the last big update, so I'll get it updated ASAP.
However, it is very easy to add, by simply adding the component to an existing ScrollRect
mahgo
@mahgo
I'm using UILineRendererList to render multiple lines, and am trying to style my lines with a sprite that I want to repeat/tile, but it is only stretching, even if I set Wrap Mode - Repeat on the sprite. What can I do to achieve this?
Artyom
@artyomabgaryan
@SimonDarksideJ is there way to use Scroll Snap & infinite scroll together ?
Simon (Darkside) Jackson
@SimonDarksideJ
You can use the HSS & VSS controls with the Infinite scroll control @artyomabgaryan . they have been updated to work together
Can't speak to the other "ScrollSnap" and ContentScrollSnap controls
Can you log an issue @mahgo with replication instructions and possibly a sample scene demonstrating the issue, the line renderer (especially the texture version) should work with wrap textures
jefftobler
@jefftobler
Hi All, we are finishing up a large adventure game and wanting to use UUE to insert images into a text block. Maybe a stupid question, but I'm trying to load the package in PackageManager and it is greyed out. I've tried 2019.5 and 2019.1. We are developing using 2019.3.13f1.
Simon (Darkside) Jackson
@SimonDarksideJ
Sorry for the delay in response due to the holidays :S
Can you detail the replication instructions @jefftobler , we test the deployment of the project quite vigorously using 2018, 2019 and when called, 2020
Curious about 2019.5 :D advanced copy? I've been testing specifically with:
  • 2018.4.30
  • 2019.1.14
  • 2019.4.16
  • 2020.1...
Jamjardavies
@Jamjardavies

Not sure if this is known, but I've just created an issue regarding the Content Scroll Snap Horizontal. I know I must be a pain finding issues with this one control :P

https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/issues/362/bug-single-child-in

Simon (Darkside) Jackson
@SimonDarksideJ
Spotted the report @Jamjardavies and thanks for logging it. I Will get it looked at asap
2 replies
frozonnorth
@frozonnorth
Hi, just tried out The Reorderable List. Just to suggest to have position of the dragged elements based of the initial click position in OnBeginDrag() by including an offset.
image.png
image.png
Simon (Darkside) Jackson
@SimonDarksideJ
Great suggestion @frozonnorth , could you log that as an issue of type "proposal" to the Bitbucket repo so it can be picked up in the new year.

A very Merry Christmas and a happy new 2021 to all users of the Unity UI Extensions project. We're truly honored you chose to include us in your project and just as happy it helps you be successful faster and quicker!

If there is something else you need in the UI world, let us know on the BitBucket site and we'd be happy to help.

CortiWins
@CortiWins
Hello folks! I will only ask one question this year, i promise ;-) Does this project have scripts that help with using a gamepad/keyboard via event system in menus? I'm doing okay with scrolling panels now, but getting it to work with the EventSystem seems more complicated.
Simon (Darkside) Jackson
@SimonDarksideJ
Check out the menu sample which is an effective menu system using the event system. How that helps @CortiWins
And don't be a stranger, feel free to chat here @CortiWins
CortiWins
@CortiWins
Happy new year everyone.
I got a strange effect with "UIScrollToSelection" where works on a few Buttons, but theres one Button where the whole scroll panel tries to scroll into negative Y and it flickers around because of that, and i'd love to know what i did wrong because that button has the same configuration as the others.
CortiWins
@CortiWins
Okay. It's not a certain button, but rather the buttons distance from the top border of the content panel + the buttons height. It seems to try to scroll 1/2 of the button height. Now lets see why it does that. Pivots don't seem to be an influence.
CortiWins
@CortiWins

Scenario:

  • Button is set to the top-left (0, 0) of the content panel.
  • The content panel is scrolled to the top border, with a Y-offset of 0.
  • On selecting the button, UpdateVerticalScrollPosition is called
  • selectionPosition is calculated as 0, which looks fine, its at the top.

Then GetScrollOffset is called with the following values

UIScrollToSelection.GetScrollOffset(position = 0, listAnchorPosition = 0, targetLength = 100, maskLength= 708)
And returns the value = 808

Which leads to a change in the verticalNormalizedPosition from 1.0
Before: TargetScrollRect.verticalNormalizedPosition 1.00
After: TargetScrollRect.verticalNormalizedPosition 1.06...

Which in ScrollRect.MovementType == Elastic leads to the flickering movement.

CortiWins
@CortiWins

So in GetScrollOffset() for a position that requires 0 scrolling ( as i see it, correct me if i'm wrong ),
this leads to scrolling of 1 heigth of the control, if there's less than 0.5 height of the control distance the the top border.

if (position < listAnchorPosition + (targetLength / 2))
{
// 808 = ( 708 ) - ( -100)
return (listAnchorPosition + maskLength) - (position - targetLength);
}

CortiWins
@CortiWins
And now i found out that it's a known issue and that there is a replacement that seems to work better in the pull requests. Oh well.
Simon (Darkside) Jackson
@SimonDarksideJ
It's a known issue atm due to some changes in unity somewhere. A simple fix is to change the type of scrollrect to clamped (not elastic or unrestricted) which will stop the jitter
The cause is because when the control reaches the end of the list of children it no longer "stops" which causes the control to constantly try to compensate, which causes the jitter. Still looking in to it, details are logged on bitbucket
The updated control improves the situation but does not 100% resolve it. Working with the original author on a fix
GrayMonkey
@GrayMonkey
Hi All - Happy new year and loving the extension... Has saved me a shed ton of time trying to get UIs working and also allowed me to be a little more/over ambitious with what I'm trying to achieve. I have a question about the Horizontal Scroll Snap which I understand generates the content when its initialised. It is possible to change the content dynamically? i.e. I'm using it to purchase shop items and I want it to change content depending on if Shop content is selected or Game content, plus I also have language toggle filters which also changes the content.
CortiWins
@CortiWins
Hey @GrayMonkey . The class has methods for Adding and Removing game objects and batches of gameObjects. The add-Methods set the gameObjects as Children of the scrollrect and call internal updates. The Remove-Methods unset the parent of the removed objects and give them back as an out-parameter, so you can store them in any other object for later use. For the toggle filter, as the Snap panels deactivates items that are not visible, so just deactivating the gameObject as you would in a standard unity scrollRect will probably not work ( correct me if im wrong here, Simon ), instead you can use the Add and Remove-methods s well.
GrayMonkey
@GrayMonkey
@CortiWins , thanks for the info, had found those methods in the source, but your guidance was very useful. Took some mucking around with the code but I think I have now got it working!
CortiWins
@CortiWins
Nice!
CortiWins
@CortiWins
Well, the improved UIScrollToSelection still has its problems when used in TMP_Dropdown. Wonder how i'm going to solve that.
Nevermind, i'm a moron that tricked himself by having two versions of the script.
CortiWins
@CortiWins
Using Update() to watch for changing variables feels so wrong, but since Unitys Controls doesnt have events for a lot of stuff, i dont see a better way.
Simon (Darkside) Jackson
@SimonDarksideJ
Happy new year to all. Sincere apologies for the delay in responses as I've been avoiding tech for the holidays to take some much-needed rest. But let's crack on as I see some very interesting responses :D
@GrayMonkey Yes, you can change the content of the HSS/VSS dynamically at runtime, but it is key to do it in LateUpdate and also tell the control you have updated it by calling the DistributePages function to reset the view. I'll try and do some testing with this approach and maybe add another example. Let me know if this works for you.
But as @CortiWins , it's better to use the built-in Add/Remove functions :D
ANd thanks for jumping in and responding @CortiWins :D
Simon (Darkside) Jackson
@SimonDarksideJ
And as a tip @CortiWins , DO NOT use update for making alterations to UI controls, always use LateUpdate Just Because Unity... :D (has to do with the execution order for when the UI is updated). Better to plan updates for the start of the next frame than try to alter UI before render.
And yes @CortiWins the new UIScrollTo script isn't perfect, but greatly reduces the impact. The biggest issue is finding a way to detect when the content is at the end of the control's RectTransform, Because Unity does not tell you. And with the Elastic movement option, it takes a long time to "settle" which only confuses the method used in this script.
CortiWins
@CortiWins
Oh, and once again i learned something. So always LateUpdate. Thanks!
davidcanepa
@davidcanepa
Hello @SimonDarksideJ
Thank you for the extension. It is great!
Currently I'm using an autocomplete dropdown combo box. I've managed to programmatically get it to populate the dropdown options from an array of around 140 gameobjects which get included by a specific tag. However when I type what I'm looking for the dropdown displays more items than specified in the editor and it also displays elements that are not related to what I typed at all. By any chance do you know what could be causing this? I have looked in your examples, documentation, tutorial video and can't seem to find what is causing it.
CortiWins
@CortiWins
hey @davidcanepa Can you give examples of which texts exactly dont give the results you expect? Especially the search term and the unexpected found selection would be good.
davidcanepa
@davidcanepa
Hello @CortiWins
Thank you for getting back to me. It is much appreciated! I'd be more than happy to provide some examples and context. The app I'm developing is for a Hotel and guests need to choose the room they are going to from the Autocomplete dropdown box. Thus, the names of the gameobjects are "room 320, room 631, room 118, etc." Then there are a few that have a bit more in the names such as "historic kitchen, lift floor 3, lift floor -2, etc". All of these make the total of approximate 140 gameobjects which populate the dropdown at runtime based on their tags. So for example, when I run it and I type in the autocomplete box "339" I get all of these options appearing BEFORE 339 appears (I won't put room in to save typing it for each one): 506, 220, 217, 310, 427, 429, 530, 529, 627, 629, and finally room 339. In the Inspector for "Items To Display" I put in 3. Hence why I don't understand why all of those options appear and most of them don't even have a 3 or a 9 in them.
Please let me know if you would need any more information and more than happy to send/provide what you would need :)
CortiWins
@CortiWins
That doesnt sound like a sideproject but actual dayjob work.
grafik.png
Okay, i tried it in the example "ComboBox" and it works fine.