How-To: Request Only What You Need

Goal: let a consumer that needs only stats skip the cost of building names, icons and lore.

Prerequisites
A provider from Quick Start.

1. Guard each group in the provider

Wrap each group of entries in IsCategoryRequested(RequestedCategories, Tag). It returns true when the request is empty (everything) or contains the tag. Built-in tags: CrimsonInspector.Request.All, .Identity, .Stats, .Description, .Tags (Blueprint getters Get Request Tag All ... Get Request Tag Tags).

Verify
With an empty request, every group is emitted.

2. Ask for a category in the consumer

Make Gameplay Tag Container with Get Request Tag Stats -> Get Inspector Data (Requested Categories).

Verify
Only stat lines come back.

See also

  • API Reference