Skip to content

bugrahanakbulut/Unity-Infinite-Scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeFactor

Unity-Infinite-Scroll

Unity UI Optimized Scroll Rect to represent large number of entities with less rect transform. Currently only vertical scroll supported.

DynamicScrollRect does not rely any layout group element to keep entities organized. You can use vertical, horizontal or grid orientation without using any built-in layout element.

Alt Text Alt Text Alt Text

For Custom Usage

By inheriting from ScrollItemData and ScrollItem you can create your custom scroll entities. You should be aware of CustomScrollItem inherited from monobehaviour so its' file name and class name must be identical to attach component to game object.

public class CustomScrollItemData : ScrollItemData
{
    // Some arbitrary fields and properties

    public CustomScrollItemData(int index) : base(index)
    {
        
    }
}

public class CustomScrollItem : ScrollItem<CustomScrollItemData> 
{
    protected override void InitItemData(CustomScrollItemData data)
    {
        base.InitItemData(data);
    }

    protected override void ActivatedCustomActions()
    {
        base.ActivatedCustomActions();
    }

    protected override void DeactivatedCustomActions()
    {
        base.DeactivatedCustomActions();
    }
}

Focusing Items

Scroll rect can make focus easily when entities outside of the viewport. You can add offset to focus or determine focus duration from focus settings on DynamicScrollRect component.

animated

TODO

This project still in under development so there might be some naughty bugs :D. If you met some of them or you need to implement any feature top of it, and if you get stuck please feel free to contact. There are some feature I will be implement in near future :

  • Focus Item 🎉
  • Horizontal Movement Support 🎉
  • Handling changes in entities (adding, removing etc.) throughout application life-time

Contact & Some Additional Notes

The project is done for educational purpose and may include some files that I do not own. If you own anything and don't want it to be in the project or if you have any questions or comments, please feel free to contact me.

Releases

No releases published

Packages

No packages published