Search Unity

Optimized ScrollView Adapter + Playmaker support

Discussion in 'Assets and Asset Store' started by xucian, Apr 1, 2016.

  1. chenquanjun

    chenquanjun

    Joined:
    Aug 23, 2017
    Posts:
    5
    ChatView item move strangely when gravity select start
     

    Attached Files:

  2. chenquanjun

    chenquanjun

    Joined:
    Aug 23, 2017
    Posts:
    5
    if i change gravity to start and insert item using freezeEndEdge=false, items disappear when content smaller than viewport unless drag the view or add enough items

    Code (CSharp):
    1.        
    2. protected override void OnAddItemRequested(ChatExample adapter, int index)
    3.         {
    4.             base.OnAddItemRequested(adapter, index);
    5.  
    6.             adapter.Data.InsertOne(index, CreateRandomModel(index), false); // change to false
    7.         }
    8.  
     

    Attached Files:

  3. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hello,

    Sorry for the late reply - week busier than usual.
    Yes, you were close to the solution.
    You also need to have the ScheduleComputeVisibilityTwinPass(..) be called with false instead of true. This is because what that call does is instructing OSA in which direction to grow/shrink the entire content when the new items' sizes are calculated (in this scenario, items' size are unknown until they're displayed).
     
  4. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    OSA is now 50% OFF!
     
  5. gouasmimedlotfi

    gouasmimedlotfi

    Joined:
    Oct 13, 2019
    Posts:
    9
    Hello, i love the asset, works great.
    i wanted to know if it's possible to make osa scroll through its decoration when the scroller have 0 elements.
    This is my content decoration :



    And this is the grid items :




    I have the option to filter elements, so in the case if it filters out all elements (number of items = 0) , i can't scroll through content decoration, is it possible ?
     
  6. azukiidx

    azukiidx

    Joined:
    Nov 22, 2017
    Posts:
    9
    Hello,
    (sorry I’m using the translate tool. )

    I want to create an auto-scroll function for Horizontal and LoopItems.
    ( for example, 5 seconds later do auto animation to the next item.)


    so implemented.

    scrollView.SmoothScrollTo(index +1 , 0.6f);


    it looks like working. but when over model range index throw exception for OSA.

    I changed this.

    scrollView.SmoothScrollTo(index ==scrollView.Data.Count-1 ? 0 :index +1 , 0.6f);


    However, this will animate to the first item without looping.

    The movement I am looking for is to display the first item while animating to move to the next item in this manner.

    it’s possible?

    thanks.
     
  7. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hello!

    This was actually a bug we've solved, but write me on discord to get the pre-release which contains the fix. The next official version will be published in a few weeks.


    Hello!

    Yes, the trick is to enable looping in inspector.
    Also, make sure to have at least 1 item visible before/after the current focused item, because when looping, the direction SmoothScrollTo goes to is not always the one you'd expect. Having the target item already visible, however, does make SmoothScrollTo behave as expected.
    Use the normalizedOffsetFromViewportStart and normalizedPositionOfItemPivotToUse parameters of SmoothScrollTo to fine-adjust the item's placement so that the next item is always visible (it can be just 1% visible, if you want).
     
  8. azukiidx

    azukiidx

    Joined:
    Nov 22, 2017
    Posts:
    9
    thanks for the reply!
    it's just worked perfectly!!
     
  9. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hehe, just curious if you're still using OSA. I had a jira task for this and only now I tackled it (since it was pretty low priority). Here's a link describing why the issue happens in some cases. For the other cases, we'll have a new release in a few weeks which will also include a fix. If you want a pre-release, ask me on discord.

    -- Lucian
     
  10. MohHeader

    MohHeader

    Joined:
    Aug 12, 2015
    Posts:
    41
    Hello ^_^

    Not sure if this was asked before,

    I am trying to achieve something like a header that would scroll up while scrolling the list up something almost like using OSAContentDecorator

    but once the user scrolls down the header start to be shown again,
    example:


    any advice?

    Thanks
     
    Last edited: Jun 6, 2021
  11. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hello,

    Starting with OSAContentDecorator might be one way, but no quick solutions exists. You'll need to first learn how to use OSAContentDecorator in a regular scenario, and then combine that with your logic, i.e. enabling/disabling it and clamping its position based on scroll events. You can get updated every time the scroll position changes by overriding OSA.OnDrag(). You might even do it without OSAContentDecorator, as most of the the complexity lies in the code you'll place in OnDrag()
     
  12. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Hi,

    Unfortunately, this asset is much more complicated to use than I hoped it would be.

    I want to have a scroll view just as in the "GridWithCategories" example that I imagined populating by iterating through a list of objects and assign specific values from those objects to the list item templates. Am I right that I cant just copy the example over into my scene? If I copy it into a new scene it stops working.

    I was able to use the wizard and have an example scroll view with all the template items in it. This only worked in my setup after calling RetrieveDataAndUpdate() manually, no idea why. Maybe because the OSA in my setup is not visible from start. I nowhere found the option in parameters to dynamically change columns by width. Am I right that I need to deep dig into the examples to use such features?

    I more and more understand it's basically not a "real" template like "New UI Widgets" or "Modern UI Pack" but more just a library you need to learn how to use? Normally the assets I buy are more drag and drop, so please forgive me those questions.
     
    jGate99 likes this.
  13. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,941
    Why would you use it when you already have New UI Widgets? Support from @ilih is matchless and his listview has so many layouts and so many examples.

    BTW, i own this as well as New UI Widgets too
     
  14. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    I am developing a business application that allows to import and visualize user data in a variety of ways. I was under the impression that if I want to securely display a list of maybe 4000 values of a dataset in Unity UI, OSA would be a better option than New UI Widgets.

    Also, I really like some of the templates in OSA. I just thought you could just copy them into your own UI.
     
    Last edited: Jul 22, 2021
  15. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    Is there a way to know the size of an item which is not currently displayed?

    I tried that but it doesn't work:
    Code (CSharp):
    1. public double GetItemSize(int itemIndex)
    2. {
    3.     int itemIndexInView = _ItemsDesc.GetItemViewIndexFromRealIndexChecked(itemIndex);
    4.     return _ItemsDesc[itemIndexInView];
    5. }
     
  16. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    Sorry, scratch that, it is working fine, I just mixed the indexes in my test.
     
    xucian likes this.
  17. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hi,

    You described it pretty well in your last paragraph. Yes, this is a library/plugin/add-on and not a template package, although the demo scenes included will become templates after you get used to the base functionality.

    Specifically to your first question, no, you cannot loop over all items, because all items never exist at the same time. Instead, OSA asks you to supply the data for each item once it becomes visible. This case actually gives you more flexibility, since you still need to store your list of models somewhere. It's just another way of doing the same thing

    On second question: If you refer to a (vertical) GridAdapter, you don't really specify the columns width, but the number of columns. If you want a certain column width, you just do a reverse calculation and set the ScrollView's width accordingly: scrollViewWidth = numColumns * desiredCoumnWidth. OSA adapts at runtime when its size is changed.
    You have to have some knowledge about Unity's LayoutElement, LayoutGroup, since the cells on each row are inside such layout structures and comply with Unity's rules. This is useful if you want your cells to behave a certain way (for ex., expand or keep their width). Kind of out of scope here.
    Ultimately, yes, you'll need to go over some examples and their associated manuals to fully absorb OSA's power. And oh you'll be powerful after that. :)
     
  18. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Yep.
    Just a note: the size of that item given by the desc is the "currently known" size, which is Params.DefaultItemSize (in most cases) if the item was never shown and you're dynamically resizing the items (via patterns like CSF).
     
  19. Alfred1060

    Alfred1060

    Joined:
    Oct 6, 2021
    Posts:
    3
    Hey, @thefallengamesstudio! Your plugin looks great. And I have a question. I need to make something like an in-game shop, which contains groups with different counts of items and tracking of a current group at the bottom (and tracker must have different icons for groups). And the name of each group must be located at the top. It looks like a mix of a horizontal grid with categories and a PageView. Can I implement this scroll list with your plugin? template.png
     
  20. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hey,

    Yes. I recommend sticking with only the pageview code (so an item would be an entire page form OSA's perspective) and manually manage the inner grids (Using GridLayouts and manually instantiating the items in them).
    Can also use a horizontal version of 'grid_with_categories' demo, and the title will be invisible and used as a separator.

    Whatever you choose, there'll be manual work and it'll take some time to get it fully functional.

    Short answer: yes, with some work.
     
  21. Clrchan

    Clrchan

    Joined:
    Nov 9, 2019
    Posts:
    2
    Hello,

    When I use "SimpleMultiplePrefabs" example to my code and called Data Refresh() (OSA.cs) function, scrollViewsPosition is always set to1.

    How can I set to not moving scrollViewPosition when I call Refresh()?
     
  22. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hey.
    The easiest would be storing the 'GetNormalizedPosition()' in a variable before Reset/Refresh, and then setting it back with 'SetNormalizedPosition()'
     
  23. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    OSA 6.0.1 just got released! Grab yours while it's still hot!
     
    grimmgames likes this.
  24. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    Nice to see an update! I'll probably install it soon.

    A quick question about it, you've indicated in the migration guide that the first step is to delete the OSA directory, but I have done some modification in your code, so deleting the directory will make it much harder to re-import these modification.
    Are the changes so drastic that a clean install is necessary or is it just to avoid some installation problems which may arise?
     
  25. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Yep, it's mandatory to delete the prev import. What changes did you make, exactly? Hope you have a list of them documented, somewhere. :D Otherwise, you'll need a git diff with the old pack (you can request it via email)
     
  26. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    Thanks for the answer.
    I have a branch where I put the assets I use without any modification, and I merge that branch with the trunk to integrate the updates of the assets while keeping my custom modification.
    It usually works well, except when there's structural modification such as split files or some directories re-organization.

    I don't remember exactly the modification I made, but they are minor, usually a private transformed into a protected here and there so I can access more things.
    When it's something more serious like a bug I usually post here and you provide a fix in a few hours (by the way, I've never seen someone react as fast as that, you're doing quite a good job!).

    I will do as you recommend, with the delete and reinstall.
    I have the list of the custom modification in my GIT history so I'll probably be able to re-integrate them manually quite easily, just a matter of finding out where to put them in the new version.
    Anyway, expect some cries for help if I cannot find something ;)
     
    xucian likes this.
  27. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    That's a great idea. Never thought about leveraging git to separate custom modifications of libraries.
    This can make it into a nice blog post.
    I'm thinking the ideal process would be:
    1. import an asset
    2. you decided to make a change. create a long-lasting branch "libchanges-<asset-name>", if you didn't already. add your changes there
    3. merge that branch into your main branches

    Doing 2-3 each time you need to make a change keeps everything documented automatically by git history
     
  28. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    I must admit that it takes me a lot less time that before to update an asset now that I am using that branching method.
    For example, it took me only 1 hour to update to the new OSA version (from 5.1.2 to 6.0.1).
    I just deleted the OSA directory from my Assets branch, imported the new version, made the commit, and then merged into my trunk.
    I went slowly because I prefer to spend 30 more minutes to avoid messing with branching operations...

    I had a minor merge to do manually and that was it, all my custom modifications have survived, and GIT managed to track most of the files which have been moved (in this case, nearly all files, if not all).


    You were curious about my custom modifications, here is the list:

    Call to virtual method 'PostUpdateViewsHolder(vh);' added at the end of 'OSA.AddViewsHolderAndMakeVisible()'

    Added to OSA:
    Code (CSharp):
    1. public TItemViewsHolder FirstVisibleItem { get { return _VisibleItems[0]; } }
    2. public TItemViewsHolder LastVisibleItem { get { return _VisibleItems[_VisibleItems.Count-1]; } }
    3. public TItemViewsHolder MiddleVisibleItem { get { return _VisibleItems[_VisibleItems.Count/2]; } }
    Added 'public double GetItemSize(int itemIndex)' to OSA.

    Added 'scrollRect = null;' just after 'scrollRect = GetComponentInParent<ScrollRect>();' in 'ScrollbarFixer8.Awake()'.
    I do not remember why I did that, it was done with several random fixes.

    In 'BaseParams.AssertValidWidthHeight()', I replaced the 2 '< 1f' by '<0.1f', another fix I do not remember.


    The fixes I do not remember are probably there to remove warnings I had at some points, either at the compilation, or more likely at runtime. They may break something but I only use a fraction of what OSA can do so it's OK for me.

    The other modifications are self-evident, just helpers to have more fine-grained control over OSA.
    I made other modifications previously, but they have been integrated in OSA itself.
     
    xucian likes this.
  29. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    247
    Asset Review:

    Hello, asset is great, but has some important problems.
    Pros:
    - good examples
    - extendible
    - self contained solution, with lots of use cases and needed components

    Cons:
    - PackedGridLayoutGroup produce a lot GC.Alloc, using ref, new(), need pooling and caching
    - a lot of executes Rebuild() make ui stattering
    - fastest way to hide ui - CanvasGroup.alpha = 0 | CanvasGroup. interactable = false - not introduced as way to hide pooled objects, you can write your way, but it should be out of the box

    Thanks for you work, good day
     
  30. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Thank you for the info. Good points.

    - I'm pretty sure PackedGridLayoutGroup is the most heavy of all, as it solves, I think, the most complex problem in this niche: recycling unstructured layouts, which, by definition, are not really recycle-able, because recycling relies on using a common UI prefab to represent multiple different values. That's as close as it could get to a smooth experience, but I'm sure there's 90% room for optimization if people would show interest in it. Currently, no one messaged about it, so we push it down the TODOs list.
    - Rebuild() Happens in several scenarios, so at this point it's only feasible to optimize for specific cases. For example, if you have a repro project or just if you can see an existing built-in demo that shows unacceptable hiccups because of Rebuild(), we can tackle it together and find a middle-ground. This was a successful approach in 99% of cases. Also, if you test in editor, you can see more GC being done than on the actual device, so that's a good thing to keep in mind
    - I'd pretty much be willing to implement this. But we saw scaling instead of disabling really speeds up some aspects of OSA (the property ScaleToZeroInsteadOfDisable in params, off by default), so I think that'd be an acceptable middle-ground. Any idea if changing the canvas alpha/interractable is even faster than that? I'm assuming not, especially since now you'd also need a CanvasGroup component on each item. But I'm very curious if you have any metrics in favor of this 3rd way of hiding unused objects. If it makes OSA better, I'm all ears.

    Thanks again!
     
  31. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
  32. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    247
    Thanks for answers.

    Sorry didn't record any profiling data, but I'm working on heavy UI in production and implemented OSA to our store UI, that is Grid and has a lot of child graphic. About ScaleToZero:
    - scale object make all graphics rebuild, especially with RectTransform.StretchedAnchors especially TextMeshPro, especially with dynamic FontAutoSize will make huge performance drops
    - using CanvasGroup.alpha instead of SetActive or ScaleToZero isn't 'best in all ways', it's just another way. It has less cost on switch ( in our case - on Scrolling ) but Graphic under CanvasGroup wouldn't be removed from lists to process (render,layout,input), but it would be skipped. It is less effective to disable lots of unused objects(for example - invisible screens) with CanvasGroup.alpha, then with SetActive, but it has smallest overhead to execute than rescale or SetActive
     
    Last edited: Aug 29, 2022
  33. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Thanks. I imagine the best way to go about enabling a third hiding option is to create a ViewsHolder type and/or helper that will retrieve the CanvasGroup and enable/disable when needed. There's already support for implementing custom logic like this, as you say, so it'd just be about deciding (from a developer experience perspective) whether to automatically hook up a CanvasGroup on the prefab if it doesn't already exist, or to enforce manual addition.

    All in all, it's a feature I'd like to explore, although any kind of (favorable) performance comparison between this and the existing methods would definitely help push this feature up the backlog.
     
  34. pixilestudios

    pixilestudios

    Joined:
    Apr 5, 2014
    Posts:
    10
    Asset is working well for us so far, but just wanted to point out one minor thing: in GridAdapter.cs the method "GetCellViewsHolderIfVisible" doesn't check for >= 0 on withCellItemIndex. So the caller has to bounds check... but for now I've just added the >= 0 check in the method itself.
    This came up because I am doing controller navigation and was setting left/right selection to current grid item +-1... which for item 0 is -1 index on left.

    Edit: Also not sure if this is the best way but for doing controller navigation on a grid I ended up setting navigation at the end of UpdateCellViewsHolder method. However because the next cell might not be setup yet, I have to iterate over previous, current, and next (for each UpdateCellViewsHolder call).
     
    Last edited: Nov 4, 2022
  35. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hi!
    Best thing is to raise an exception (and do this for other methods), but it might be too late now, as many users have already integrated OSA in large-scale projects. This could be a change for the next major release, which naturally allows for breaking changes. It's a good suggestion, I agree.

    If that works and you're happy with it (framerate etc.), I don't see any problems on the OSA part of it.
     
    pixilestudios likes this.
  36. doseon

    doseon

    Joined:
    Mar 17, 2021
    Posts:
    39
    Hello, I have a question.
    I have a problem using OSA's ScrollbarFixer8 with Unity's ScrollRect.
    When ScrollRect's MovementType is Clamped, it has been confirmed that ScrollbarFixer8's auto-hide operates normally.
    However, when the MovementType was set to Elastic, we could see that the Show and Hide methods of ScrollbarFixer8 were alternately called at the end of the scrollbar.

    Unity Version is 2021.3.13f.
    1. Do I have to set Unity's ScrollRect's MovementType to Clamped to use OSA's ScrollbarFixer8's auto-hide?
    2. If there is a way to make scrollbarFixer8's auto-hide work normally when MovementType is Elastic, I would appreciate it if you could let me know.
     
  37. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hi! Can you bring this to our discord? seems to need a deeper dive into it
     
    Last edited: Dec 1, 2022
  38. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    OSA is now 70% OFF! :cool:

    Edit: now only 50% OFF
     
    Last edited: Dec 1, 2022
  39. dfernand

    dfernand

    Joined:
    Jun 21, 2014
    Posts:
    9
    This is probably out of scope for technical discussion. But does anyone know how I would start going about integrating OSA into the Unity Asset Store package 'Dialogue System' by Pixel Crushers ? I just want a single word from many word list to be selectable via the OSA spinner but for this to be within a 'Dialogue System' UI player reply to a NPC ? I kinda know the basics i.e. just parent the OSA spinner to the Dialogue system response (which could be a button itself etc). but it will get messy having the spinner parented to a selection button etc. Also GUI focus order is an issue possibly (when u tab back and forth from GUI controls) and scaling perhaps also. Lots of little issues are creeping into my head but anyone got a concrete start for this problem ? Dunno if u can see this thread entry but I put the same question to the Pixel Crushers creator and he did give me some good pointers which is essentially 'put a unique token in the player reply text to the NPC where the (OSA) Spinner will be placed' .. dunno if there is a better alternative that this. https://www.pixelcrushers.com/phpbb/viewtopic.php?p=28442#p28442
     
  40. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hmm, this needs a deep dive to get to a proper solution. I don't have any knowledge about the Dialogue System asset.

    But bear in mind that in general the recycling that's done by OSA disrupts any operation that relies on 'sibling index' or having items ordered in a certain way: i.e. if your dialogue system relies on an OSA item to always be, for example, the 2nd child, that's not reliable. OSA does visually arrange items so that they appear as you set them in code, but the GameObjects corresponding to each item are constantly rearranged in the hierarchy.

    So you cannot make another component/system rely on the actual GameObjects that are created by OSA as items, because they're ephemeral.

    That said, there's always a way, but I'd have to understand the Dialogue System asset itself in order to find it.

    In the optimistic case, you don't need other component/system to access individual items, but just maybe a public property/field you set in the OSA MonoBehaviour you'll create that'll represent the current value, or maybe raise some event when the value changes, in case you want to store this high-level current value somewhere else, and make the system read it from there (I quite like the latter, as it's more decoupled)
     
    dfernand likes this.
  41. elyesYourArt

    elyesYourArt

    Joined:
    Dec 6, 2022
    Posts:
    2
    Hi everyone

    i recently start using OSA in a project that i just joined and found a very annoying bug and dont find any solution in the Faq or in the forum so if someone could help i will be grateful;
    The problem is that i have a list elements with different sizes when i scroll up and down everything works fine but when i click on one of the elements and then i down and up again the size of this clicked element changes and cant find where this happen and why (picture attached)

    If anyone has had this issue before, I'd love to know how they fixed it. , Thanks

    upload_2023-2-17_18-16-42.png
     
  42. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    hey!
    there are more unknowns than knowns here.
    it's not really clear how you use OSA (is it a grid, a list?). I recommend going over the manual, especially the introductive bits, then find the demo that matches your case the most and see if it has a dedicated manual for it.

    I'm not sure what 'clicking' should do as OSA doesn't handle any clicking itself, it's most probably some user code that interferes with how OSA recycles stuff. we'll either need to see some code or a more detailed explanation of what kind of OSA you use, what instructions have you followed where implementing it and what's your end-goal (expected behavior).
     
    Last edited: Feb 28, 2023
  43. FanStudioUK

    FanStudioUK

    Joined:
    Mar 31, 2013
    Posts:
    23
    Hey guys, congrats for this awesome tool!

    I couldn't find this feature so I have to ask here:
    It is possible to add a swipe button for the each item from a scroll view, like the normal functionality in a iOS scroll view? E.g. below:



    Thank you!
     
    xucian likes this.
  44. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hello!

    Sure, why not? From OSA's perspective, you're just interacting with your item, so it doesn't interfere with it.
    There's a MultiPrefab example that has sliders as items, and it's kind of the same thing.
    Also, the nested_scrollviews example uses whole ScrollViews as its items, so as long as you know how to implement that 1 item outside OSA, you should be able to use it just fine.

    Just keep recycling in mind when setting up the click listeners. I.e. either always remove old listeners and add new ones in UpdateViewsHolder(), or pass the ViewsHolder itself to your final click handler function, so it knows for what item that click was made
     
  45. FanStudioUK

    FanStudioUK

    Joined:
    Mar 31, 2013
    Posts:
    23
    Thank you! Will give it a try ;)
     
    xucian likes this.
  46. GSaHaLa

    GSaHaLa

    Joined:
    Jul 27, 2018
    Posts:
    3
    Is there any way to reverse items?Like "Reverse Arrangement"in Unity's Horizontal/VerticalLayout
     
  47. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    Hey!
    That's a more high-level functionality that OSA doesn't interfere with. Your source list of data items is the single "source of truth" and OSA will reflect that visually.
    Reversing visually just means reversing items in your list.
    If you mean to also have bottom gravity + make items start from the bottom and have new items added visually at the top of the existing ones (as opposed to below them):
    • insert items at the beginning of your data list
    • use endStationary=true when submitting those changes to OSA (depends on how you're doing it. if using a DataHelper, this step and the above step are done in a single call to InsertItems)
    • also set Gravity=end in inspector (which pushes items towards the bottom or right when you have just a few)
     
    Last edited: Apr 28, 2023
  48. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    OSA is now 50% OFF!
     
    Last edited: Jun 11, 2023
  49. ngfilms

    ngfilms

    Joined:
    Nov 18, 2015
    Posts:
    30
    Anyone know if OSA is KIV ? I’ve just purchased it , tried to install playmaker support package but it’s coming out with numerous errors. There is something in the docs about deleting 2 files (*.asmdef) but they are nowhere to be found. any help would be appreciated. PS : I am using unity 2021lts with latest playmaker with current OSA
     
  50. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    hey! I believe you might've missed the part where you import the Utils and then the Demos packages. was that the case?