Skip to content

Only items in viewport of ScrollContainer are instantiated and show data dynamically

License

Notifications You must be signed in to change notification settings

MasonDestro/Godot.Net-DynamicScrollContainer

Repository files navigation

What is this

A simple framework based on C# abstract class and interface.

To reduce memory usage, only those in viewport are instantiated and show data dynamically. Support vBoxContainer, hBoxContainer, GridContainer.

The size of container items should be the same.

How to use it

Inherit DynamicContainerItemBase and IDynamicContainerItem<Any Custom Data Type> for any Control Node, save as scene.

Inherit DynamicScrollContainerBase and IDynamicScrollContainer<Data Type of Item> for ScrollContainer.

Set child of ScrollContainer(vBoxContainer, hBoxContainer, GridContainer) to Container property, set the container item scene to Item Prefab property.

The Base calsses work for Nodes, the Interfaces work for data.

To know more about the framework on Bilibili

About

Only items in viewport of ScrollContainer are instantiated and show data dynamically

Resources

License

Stars

Watchers

Forks

Languages