Code Monkey home page Code Monkey logo

unitydynamicscrollrect's People

Contributors

breckoec avatar igorhosantos avatar lenweseregon avatar mukarillo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unitydynamicscrollrect's Issues

Can't add through Package Manager in Unity 2021.1.19f1

I know there hasn't been much work done to this in years, but I still figured I'd throw the question your way.
Any chance we can have this updated so that one can add the package through the Package Managers "Add package from git URL"?

Use IList instead of an array to make solution more flexible

If you make a little change and use IList interface instead of info array list, your solution will be prepared for use in new scenarios.

For example, I can't load all information and store it in an array, because it is too big. But if I can use an IList, I can implement a way to load only information which dynamic scroll needs.

Items are not removed when data list gets shorter?

Hi,

I am trying to integrate this into my project. My items are addable and deletable. When I add or delete them, I do this:

public void UpdateList(ItemData[] listData) //updated list of items, could be more, could be less than before
        {
            if(!dynamicScroll.Initialized) //I added this bool in the DynamicScroll to know if DynamicScroll.Initiate(...) has been called already
            {
                dynamicScroll.spacing = scrollSpacing;
                dynamicScroll.centralizeOnStop = scrollCentralizeOnStop;
                dynamicScroll.Initiate(dynamicScrollRect, listData, 0, sceneObjectTemplate);
            }
            else
            {
                dynamicScroll.ChangeList(listData);
            }
        }

It works for adding new items. But when I remove items, the UI elements are not removed (or hidden).

Am I using this right? How do I do this properly?

Start on the last element of the collection.

Hi, first of all, thank you to sharing this great asset.

The thing is that i need to change the start point of the scroll, by this I mean to start at the end of the list, on the last object, therefore on the end of the scrollrect so you can only start scrolling up.

I saw that on the methods Initialize and ChangeList, there is a startIndex that can be set, but if for example i use the mData.Length - 1 instead of 0, it only shows the last object. Looking why this is happening I found that in the CreateList method is no support for using the the max size of a collection. So I proceeded to modify this and add the functionality to iterate from the last object to the first one but it still not working as I want.

Can you guide me what I need to change/modify on the pooling or the refreshing of objects to achieve this ?

Thanks.

Compatible with Grid Layout?

Hello,

First, thank you to sharing with us this great project, this is very useful!

Now I would like to apply the same kind of process but for elements inside of a grid layout that is inside a VerticalScrollRect.

Basically, it the almost same thing instead of I have more than one element by row, and it doesn't seem to work well from now.

I will try to update the code to make this possible, but if you have any advice of how you would do it, it will be great! ๐Ÿ‘

ScrollObjct is not necessary to derive from MonoBehaviour

I think it's not necessary to add a mono script on each item in scroll list. When driving from monoBehaviour, unity have to execute code in Awake , which is performance-cost.
As a replacement, I prefer to add a virtual methd in PoolingObject like:

public GameObject gameObject { get; set; }

public virtual void AttachView(GameObject go)
{
    gameObject = go;
}

And call it in Pooling.CreateObject:

var go = GameObject.Instantiate(referenceOjbct);
var obj = new T();
obj.AttachView(go);

Scollbar support?

Hi, thanks for this great component.

I want to show a scrollbar on my UI, which can interact with the ScrollRect.
I set a vertical scrollbar to Dynicamic ScrollRect, but the scrollbar did not work properly.
How can I config the scrollbar?

[Feature Request] Elastic Movement

Asset works great from the first look. However I'm missing elastic movement when dragging beyond the end or beginning. Is there a plan to include it?

Scroll to index?

Hello, i think you might want to add some feature, that will be great: scroll to index
it basically do is that scrolls the scrollview to make the element visible, on center of the scrollRect (if possible), you'll need to pass an index argument to the method and it should animate or jump directly to the scroll position (by an optional bool/speed parameter?)

i have seen that feature in similar assets and i think it will be a great addiction if you can for sure :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.