We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private void Awake() { mSkeletonGraphic = GetComponent(); mSkeletonGraphic.OnPostProcessVertices += OnPostProcessSkeletonGraphic; }
private void OnPostProcessSkeletonGraphic(MeshGeneratorBuffers buffers) { if (!isActiveAndEnabled) return; float normalizedIndex = ptex.GetNormalizedIndex(this); // rect. Rect rect = m_EffectArea.GetSpineEffectArea(buffers, rectTransform.rect); // rotation. float rad = m_Rotation * Mathf.Deg2Rad; Vector2 dir = new Vector2(Mathf.Cos(rad), Mathf.Sin(rad)); dir.x *= rect.height / rect.width; dir = dir.normalized; // Calculate vertex position. Vector2 nomalizedPos; Matrix2x3 localMatrix = new Matrix2x3(rect, dir.x, dir.y); // Get local matrix. for (int i = 0; i < buffers.vertexCount; i++) { var vertex = buffers.vertexBuffer[i]; m_EffectArea.GetNormalizedFactor(i, localMatrix, vertex, true, out nomalizedPos); var curUv = buffers.uvBuffer[i]; buffers.uvBuffer[i] = new Vector2( Packer.ToFloat(curUv.x, curUv.y), Packer.ToFloat(nomalizedPos.y, normalizedIndex) ); } }
so , no need modify mesh method.
The text was updated successfully, but these errors were encountered:
mob-sakai
No branches or pull requests
private void Awake()
{
mSkeletonGraphic = GetComponent();
mSkeletonGraphic.OnPostProcessVertices += OnPostProcessSkeletonGraphic;
}
so , no need modify mesh method.
The text was updated successfully, but these errors were encountered: