Skip to main content

CommonPrefabs

A class in Root.Township, the global namespace.

Global settings asset with shortcuts to prefabs and items used everywhere: pouch, coin, pages and the player template. Read through the static properties.

Constructors​

MemberWhat it is
CommonPrefabs()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

7 private and internal fields
MemberWhat it is
private Shader blurShaderBacking field for BlurShader.
private NetworkPrefab coinPrefabBacking field for CoinPrefab.
private Item duplicatePageItemBacking field for DuplicatePageItem.
private Item pageItemBacking field for PageItem.
private Player playerTemplateBacking field for PlayerTemplate.
private PickupDockSettings pouchDockSettingsBacking field for PouchDockSettings.
private Item pouchItemBacking field for PouchItem; PouchPrefab also reads its prefab.

Properties​

MemberWhat it is
static Shader BlurShader { get; }The blur shader.
static NetworkPrefab CoinPrefab { get; }The coin prefab.
static Item DuplicatePageItem { get; }Item for a duplicate page.
static Item PageItem { get; }Item for a page.
static Player PlayerTemplate { get; }The player prefab template.
static PickupDockSettings PouchDockSettings { get; }Dock settings used by pouches.
static Item PouchItem { get; }The pouch item. Docking it is ignored by several systems, such as repair boxes.
static NetworkPrefab PouchPrefab { get; }Network prefab of the pouch item, used by SpawnHelper.SpawnPouchOrPickup.