Skip to main content

ItemModifier

An abstract class in Root.Township, Alta.Bezier.

Base for components that sit next to a SplineDecorator and pick or change the objects it places along a spline.

Constructors​

MemberWhat it is
protected ItemModifier()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Methods​

MemberWhat it is
virtual GameObject GetPrefab(List<SplineDecorator.Part> parts, int index)Returns the prefab to place at part index, or null to let the next modifier (or the default) choose.
virtual void Modify(List<SplineDecorator.Part> parts, int index, GameObject result)Called on each placed object so the modifier can change it.