Skip to main content

FireSettings

A class in Root.Township, Alta.Heat.

An asset describing how a fire looks: light intensity, range and shadows, and how light and particles change as the fire burns. A heat source holds one and PooledFireEffect applies it.

Constructors​

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

Fields​

9 private and internal fields
MemberWhat it is
private float initialParticlesScaleScale of the fire particles when the effect starts.
private float intensityFire light intensity.
private bool isLightBrightnessModifiedWhether PooledFireEffect scales light brightness by fire progress.
private bool isParticlesScaleModifiedWhether PooledFireEffect scales the particles by fire progress.
private AnimationCurve particlesScaleParticle scale by fire progress (0 to 1).
private AnimationCurve particleSystemParametersOverLifetimeParticle system multiplier by fire progress (0 to 1), used when particle scaling is on.
private AnimationCurve progressBrightnessMultiplierLight brightness multiplier by fire progress (0 to 1). Defaults to fading from 1 to 0.
private float rangeFire light range.
private LightShadows shadowsShadow mode for the fire light.

Properties​

MemberWhat it is
float InitialParticlesScale { get; }Particle scale when the fire effect starts.
float Intensity { get; }Light intensity of the fire.
bool IsLightBrightnessModified { get; }Whether light brightness follows ProgressBrightnessMultiplier as the fire burns.
bool IsParticlesScaleModified { get; }Whether particle scale and parameters follow their curves as the fire burns.
AnimationCurve ParticlesScale { get; }Curve over burn progress for particle scale.
AnimationCurve ParticleSystemParametersOverLifetime { get; }Curve over burn progress for the particle system multiplier.
AnimationCurve ProgressBrightnessMultiplier { get; }Curve over burn progress for light brightness.
float Range { get; }Light range of the fire.
LightShadows Shadows { get; }Shadow type of the fire's light.

Methods​

MemberWhat it is
bool CompareCurve(AnimationCurve curveA, AnimationCurve curveB)True if two curves have the same number of keys at roughly the same times and values.
void Setup(float intensity, float range, LightShadows shadows, float initialParticleScale, bool isLightBrightnessModified, AnimationCurve progressBrightnessMultiplier, bool isParticlesScaleModified, AnimationCurve particlesScale, AnimationCurve particleSystemParametersOverLifetime)Sets every field at once.

Used in​

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