private void GenerateWeights(MeshCache mesh) { Debug.Assert(mesh != null); m_SpriteMeshDataController.spriteMeshData = mesh; m_SpriteMeshDataController.CalculateWeights(m_WeightGenerator, null, kWeightTolerance); m_SpriteMeshDataController.SortTrianglesByDepth(); }
private void GenerateWeights(SpriteCache sprite) { using (m_GenerateWeightsPanel.associateBones ? new AssociateBonesScope(sprite) : null) { m_SpriteMeshDataController.spriteMeshData = sprite.GetMesh(); m_SpriteMeshDataController.CalculateWeights(m_WeightGenerator, skinningCache.vertexSelection, kWeightTolerance); m_SpriteMeshDataController.SortTrianglesByDepth(); } }