Singularity/Library/PackageCache/com.unity.2d.animation@7.0.10/Editor/SkinningModule/Selectors/GenericVertexSelector.cs
2024-05-06 11:45:45 -07:00

23 lines
635 B
C#

using System;
using UnityEngine;
namespace UnityEditor.U2D.Animation
{
internal class GenericVertexSelector : ISelector<int>
{
public ISelection<int> selection { get; set; }
public BaseSpriteMeshData spriteMeshData { get; set; }
public Func<int, bool> SelectionCallback;
public void Select()
{
Debug.Assert(selection != null);
Debug.Assert(spriteMeshData != null);
Debug.Assert(SelectionCallback != null);
for (var i = 0; i < spriteMeshData.vertexCount; i++)
selection.Select(i, SelectionCallback(i));
}
}
}