Skip to main content

PickupDecaySettings

A class in Root.Township, the global namespace.

Decay settings asset for pickups, adding rules for crafted and kinematic pickups. Read by PickupDecay.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private bool canDecayWhenCraftedBacking field for CanDecayWhenCrafted.
private bool canDecayWhenKinematicBacking field for CanDecayWhenKinematic.
private float craftedDecayTimeMultiplierBacking field for CraftedDecayTimeMultiplier.

Properties​

MemberWhat it is
bool CanDecayWhenCrafted { get; }If false, pickups that are crafted don't decay.
bool CanDecayWhenKinematic { get; }If false, pickups don't decay while their rigidbody is kinematic.
float CraftedDecayTimeMultiplier { get; }Multiplier on decay time for crafted pickups, when they are allowed to decay.

Used in​

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