Skip to main content

WoodcutConnection

A class in Root.Township, Alta.Woodcutting.

Marks a joint between two pieces of a choppable tree model: which connection type it is and which woodcut points break it. Sits on a networked tree piece.

  • Listed in Crafting and making
  • Inherits or implements MonoBehaviour
  • Attributes RequireComponent

Constructors​

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

Fields​

MemberWhat it is
WoodcutTreeModel modelSerialized backing field for Model. Public, but use Model.
5 private and internal fields
MemberWhat it is
private float breakThresholdMultiplierBacking field for BreakThresholdMultiplier.
private WoodcutConnectionType connectionTypeBacking field for ConnectionType; its bone count sets how many break points the connection has.
private NetworkEntity entityCached NetworkEntity on the same GameObject, filled the first time Entity is read.
private int pointIndexIndex of the first woodcut point in the model that belongs to this connection; BreakPoints starts here.
private int rotationsBacking field for Rotations.

Properties​

MemberWhat it is
IEnumerable<WoodcutPointData> BreakPoints { get; }The woodcut points of the model that belong to this connection, as many as the connection type has bones.
float BreakThresholdMultiplier { get; }Scales how much cutting it takes to break this connection.
WoodcutConnectionType ConnectionType { get; }The connection type, which sets how many bones (break points) it has.
NetworkEntity Entity { get; }The network entity on the same object.
WoodcutTreeModel Model { get; }The tree model this connection belongs to.
int Rotations { get; }Rotation count for the connection, set in the prefab.

Used in​

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