Skip to main content

MainMenuCraft

A class in Root.Township, the global namespace.

Main menu helper that joins a craft insert into a slot one frame after spawn (without effects), then removes itself. Used to show pre-built crafted pieces.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private JointInsert insertThe insert to connect.
private JointSlot slotThe slot to connect it into.

Methods​

MemberWhat it is
override void Initialize()After a frame, connects insert into slot and destroys this component.
1 private and internal method
MemberWhat it is
private void OnValidate()Clears slot in the editor if it does not support the insert's type.