public CharQuad OffsetVectors(CharQuad charVertices, Vector3 offset) { charVertices.BL += offset; charVertices.TL += offset; charVertices.TR += offset; charVertices.BR += offset; return(charVertices); }
public CharQuad LerpCharPos(CharQuad a, CharQuad b, float t) { a.BL = Vector3.Lerp(a.BL, b.BL, t); a.TL = Vector3.Lerp(a.TL, b.TL, t); a.TR = Vector3.Lerp(a.TR, b.TR, t); a.BR = Vector3.Lerp(a.BR, b.BR, t); return(a); }
public void SetCharPos(int charIndex, CharQuad pos) { var vIndex = _text.textInfo.characterInfo[charIndex].vertexIndex; _charVertices[vIndex + 0] = pos.BL; _charVertices[vIndex + 1] = pos.TL; _charVertices[vIndex + 2] = pos.TR; _charVertices[vIndex + 3] = pos.BR; _text.mesh.SetVertices(_charVertices); _text.canvasRenderer.SetMesh(_text.mesh); }