ICSVDisplayable

Namespace: Canley.Utility.CSV.Standard
Type: Interface

Overview

The ICSVDisplayable<T> interface acts as the contract and bridge between your data records and your user interface components. Any Unity Prefab used with the CSVTable<T>.SpawnUI method must include at least one component that implements this interface.

It decouples your data collection from your presentation layer, allowing the framework to pass records directly into your UI slots without manual assignment loops.


Method Reference

InterfaceMethod (Syntax)Description
ICSVDisplayableDisplay(T record)The required implementation contract triggered automatically by SpawnUI to populate visual elements.

Key Features

  • Generic Type Safety: Enforces type constraints so that your UI components only accept records matching your specific CSVRecord subclass.
  • Automated UI Spawning: Works hand-in-hand with CSVTable<T>.SpawnUI to instantly instantiate and populate UI lists (such as inventories, shops, or quest logs).
  • Decoupled Architecture: Keeps your UI scripts clean by handling data presentation locally inside the target prefab.

NOTE

Ensure that any GameObject passed as a prefab parameter to SpawnUI has a component implementing ICSVDisplayable<T> matching your table’s generic type, otherwise the framework will throw a missing component warning.

1 item under this folder.