Table of Contents

Class EquipmentVisualAttach

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Puts one equipment item's visual on a character body: armour bound to the body's skeleton, a weapon held on a bone. Shared by the live EquipmentVisualController and the character select preview, which dresses a body from item templates alone.

public static class EquipmentVisualAttach
Inheritance
EquipmentVisualAttach
Inherited Members

Methods

AttachArmor(GameObject, SkinnedMeshRenderer, Transform)

Shows prefab's skinned mesh on target, bound to the body under skeletonRoot. False (and target left without a mesh) when it cannot be.

public static bool AttachArmor(GameObject prefab, SkinnedMeshRenderer target, Transform skeletonRoot)

Parameters

prefab GameObject
target SkinnedMeshRenderer
skeletonRoot Transform

Returns

bool

AttachWeapon(GameObject, WeaponTemplate, Transform, out Mesh)

Makes prefab's mesh a child of weapon's attach bone under skeletonRoot, and returns that new object (null when it cannot). A skinned weapon is baked into bakedMesh, which the caller owns and must destroy with the weapon.

public static GameObject AttachWeapon(GameObject prefab, WeaponTemplate weapon, Transform skeletonRoot, out Mesh bakedMesh)

Parameters

prefab GameObject
weapon WeaponTemplate
skeletonRoot Transform
bakedMesh Mesh

Returns

GameObject