Diagram · A gallery grid with locked and unlocked cards side by side
Diagram · A gallery grid with locked and unlocked cards side by side View full-size figure

What the problem was

Reviewing the gallery screen showed locked cards as flat empty rectangles. Sitting next to unlocked ones, those blanks carried no information, so the screen read as an unfinished list rather than a collection. Overall contrast was low enough that card edges blurred too.

That screen is Ren'Py, and the same result is common in Unity. Draw cards from data that only carries an unlocked flag and there is naturally nothing to put on a locked card.

Three things a locked card has to carry

An empty rectangle provides none of the three.

  1. A signal that something exists. A silhouette or a blurred thumbnail is enough.
  2. The unlock condition, in one line.
  3. Position within the total, so progress turns the list into a goal.
var card = new VisualElement();
card.AddToClassList(entry.unlocked ? "card--unlocked" : "card--locked");
card.Add(new Image { image = entry.unlocked ? entry.art : entry.silhouette });
if (!entry.unlocked)
    card.Add(new Label(entry.unlockHint));   // the card states its own condition

Locked states still need contrast

Dim a locked card and remove its border and the card disappears from the screen. Lower the fill and keep the border.

.card--locked { background-color: rgba(255, 255, 255, 0.04); border-width: 1px; border-color: rgba(255, 255, 255, 0.22); }
.card--locked .unity-label { color: rgba(255, 255, 255, 0.62); }

Expected result and next step

When a locked card alone tells you what unlocks it, this item is done. Ordering is next: pulling unlocked cards to the front shows progress clearly and keeps moving positions around, and which one you want depends on the screen's purpose.

Verification scope

Official documentation review

Verified

Reviewed the article's code and procedure against official Unity documentation and marked it ready for publication. This is not a claim of an independent Unity project or device reproduction; version- or device-specific reports will be checked in that environment as follow-up.

Official documentation checkedUI Toolkit overview ↗