/// <summary> /// Attaches a clone of the costume item to given CIbody figure. /// Send the GameObject of a costumeItem here, and we'll clone it, bind it and return the result /// </summary> /// <returns>The cloned GameObject of the costume_item</returns> /// <param name="costume_item">Costume_item.</param> /// <param name="figure">Figure.</param> public static GameObject CloneAndAttachCostumeItemToFigure(GameObject costume_item, BoneUtility.BoneMap figure_bone_map, CIbody figure, Transform root_bone) { // instatiate copy GameObject clone = GameObject.Instantiate(costume_item); clone.name = costume_item.name; // use the basic Attachment method GeometryTransferUtility.AttachCostumeItemToFigure(clone, figure_bone_map, figure, root_bone); // return the cloned costume_item GameObject return(clone); }
/// <summary> /// Attaches a costume item to the figure /// </summary> /// <returns>A GameObject of the costume item.</returns> /// <param name="costume_item">The GameObject of the costume item</param> public GameObject AttachCostumeItemToFigure(GameObject costume_item) { return(GeometryTransferUtility.AttachCostumeItemToFigure(costume_item, this.BoneMap, figure, transform)); }