Skip to main content

AddonCraftingPart

A class in Root.Township, the global namespace.

Crafting part that shows an extra pooled visual at a set point while something is joined into its insert. Client only.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private PooledObject addonThe add-on visual currently shown, if any.
private Transform addOnPositionWhere the add-on visual is placed.
private PooledObjectDefinition jointAddonPooled object definition for the add-on visual.

Methods​

MemberWhat it is
protected override void Awake()On clients, hooks the insert's Connected and Disconnected events.
2 private and internal methods
MemberWhat it is
private void Add(JointPoint obj)Takes the add-on visual from the pool at addOnPosition when the insert connects.
private void Remove(JointPoint obj)Releases the add-on visual when the insert disconnects.