Initial Commit
This commit is contained in:
parent
53eb92e9af
commit
270ab7d11f
15341 changed files with 700234 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
using NUnit.Framework;
|
||||
using UnityEngine.UI;
|
||||
using System.Reflection;
|
||||
|
||||
public class TestableImage : Image
|
||||
{
|
||||
public bool isOnPopulateMeshCalled = false;
|
||||
public bool isGeometryUpdated = false;
|
||||
|
||||
// Hook into the mesh generation so we can do our check.
|
||||
protected override void OnPopulateMesh(VertexHelper toFill)
|
||||
{
|
||||
base.OnPopulateMesh(toFill);
|
||||
Assert.That(toFill.currentVertCount, Is.GreaterThan(0), "Expected the mesh to be filled but it was not. Should not have a mesh with zero vertices.");
|
||||
isOnPopulateMeshCalled = true;
|
||||
}
|
||||
|
||||
protected override void UpdateGeometry()
|
||||
{
|
||||
base.UpdateGeometry();
|
||||
isGeometryUpdated = true;
|
||||
}
|
||||
|
||||
public void GenerateImageData(VertexHelper vh)
|
||||
{
|
||||
OnPopulateMesh(vh);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue