Skip to main content

RespawnShrineData

A class in Root.Township, ATT.Respawn.

Asset with the settings for one respawn shrine: id, fuel type and use, spawn and beacon positions. Looked up by shrine id through RespawnSystemSettings.

Constructors​

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

Fields​

9 private and internal fields
MemberWhat it is
private Vector3 beaconPositionBacking field for BeaconPosition.
private PooledObjectDefinition beaconPrefabDefinitionBacking field for BeaconPrefabDefinition.
private float fuelConsumedPerHourBacking field for FuelConsumedPerHour.
private string guidShrine id as a string, set in the inspector.
private bool isGlobalRespawnShrineBacking field for IsGlobalRespawnShrine.
private int maximumFuelCapacityBacking field for MaxFuelCapacity.
private PickupDockSettings resourceTypeBacking field for ResourceType.
private Guid shrineIdCached parsed value of guid.
private Vector3 spawnPositionBacking field for SpawnPosition.

Properties​

MemberWhat it is
Vector3 BeaconPosition { get; }World position where the shrine's beacon view is shown.
PooledObjectDefinition BeaconPrefabDefinition { get; }Pooled prefab for the beacon view. Not spawned for the global shrine.
float FuelConsumedPerHour { get; }Fuel the shrine burns per hour while powered.
bool IsGlobalRespawnShrine { get; }True for the default shrine everyone respawns at when no powered shrine is active.
int MaxFuelCapacity { get; }Most fuel the shrine holds. Zero or less means it never runs out.
PickupDockSettings ResourceType { get; }Dock settings for the fuel item the shrine takes.
Guid ShrineId { get; }The shrine's id, parsed from guid on first use and cached.
Vector3 SpawnPosition { get; }World position players respawn at for this shrine.

Methods​

MemberWhat it is
uint GetResourceTypeHash()Prefab hash of the first item the fuel dock accepts, used when spawning fuel into the dock.

Used in​

Members of other types that take, return or hold a RespawnShrineData: