Skip to content

Prefab as Template #8

Description

@Bitstachio

Background

The Guide page uses a shared button prefab (template) for multiple buttons that differ only by icon image. Currently, each button instance has its icon field modified directly on the instance without applying the change back to the base prefab.

Current State

  • A single button prefab acts as the shared template for guide buttons.
  • Each placed instance has its icon Image field overridden at the instance level (visible as a bold/modified field in the Inspector).
  • These per-instance overrides are intentionally left unapplied to the source prefab, since the icon is meant to vary per button while the rest of the style stays shared.

To Investigate

  • Whether relying on unapplied per-instance prefab overrides is sustainable as the number of guide buttons grows, or if it becomes error-prone / hard to track.
  • Whether the icon should instead be driven through a data-binding approach (e.g., a SetButtonData-style method called at initialization from a controller/list of guide entries) rather than being set manually per instance in the scene.
  • Whether Prefab Variants are a better fit if guide buttons diverge further (not just icon, but layout/behavior differences).
  • General guidance/convention for the project: when is it acceptable for a prefab instance to carry permanent, unapplied field overrides vs. when data should be injected at runtime.

Goal

Determine the best long-term pattern for prefab templates with per-instance varying data (starting with the Guide page buttons), and document the convention for future reuse.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions