Search
Try Notion
🎴🎴
Card List
Gallery list facilitates populating gallery items easily through Card List Manager component. We only need to manage the Item Template to change the style or bind actions for the gallery items.
Get Started
Populate Gallery Items
Populate items through Card List Manager
On Card List Manager, you can put the title, subtitle, image and description of the list item. You can also reorder the list by dragging the item inside the list.
Populate items through script
If you want to dynamic populate list items through scripts. Please checkout the example script in Demo/ExampleDynamicCardList.cs
Common Usage
Change the size of list items
On Card List Manager, double click List Content, it will locate to the Content Object.
On the Content Object > Grid Layout Group, you can change the cell size.
Locate to the Item Template game object, you can then change Image and title size .
Bind actions for item
You can simply add a OnClick actions on Item Template.
Or you can subscribe to the OnCardClick method, please refer to the ExampleCardItemAction.cs script which is also attached on the ItemTemplate in the Demo scene.
ExampleCardItemAction.cs: Click on item and show details on the right panel
Change the steps used by Prev and Next button
Set the step on the Scroll Controller component to change the steps used by Prev and Next buttons.
API
Card List Manager
The public properties and methods of CardListManager.cs are as follows
Properties
Search
Name
Type
Description
List<Card>
A list of card information including title, subtitle, image, and description.
Card
The current selected card.
GameObject
The card item template game object that is used for populating other card items.
Count3
Public Methods
Search
Name
Description
Populate new card items from the cardList to the gallery.
Safely destroy all the items from the gallery.
Add a new card item to the gallery.
Count3
Card Item
Properties
Search
Name
Type
Description
Transform
The related title game object used to display the title of the card item.
Transform
The related subtitle game object used to display the subtitle of the card item.
Image
The related image game object used to display the image of the card item.
Transform
The related description game object used to display the description of the card item.
OnCardClickedHandler(Card card)
A delegation event that's triggered when the card item is clicked. It can be subscribed/unsubscribed. Please checkout Demo/ExampleCardItemAction.csfor an example.
Card
The card contains all the contents of a card item including the title, subtitle, description and image.
Count6