Search Unity

Prefab as object factory usage pattern

Discussion in 'Prefabs' started by Tony-Lovell, Aug 10, 2020.

  1. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    127
    I have data objects that describe various guns, each one of them having an array of prefabs representing projectiles the gun being described can fire.

    The issue is that these projectile prefab objects appear in my scene. They are meant only to be there to indicate which prefab is to be cloned to create a projectile at the moment it is needed.

    How can/should I keep these "projectile factory" prefabs from being in my scene? Should I add them to a "Data Library" node that I then de-activate?