TextPlus.cs 676 B

12345678910111213141516171819202122
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. public class TextPlus : Image
  6. {
  7. protected override void OnPopulateMesh(VertexHelper toFill)
  8. {
  9. //base.OnPopulateMesh(toFill);
  10. toFill.Clear();
  11. toFill.AddVert(new Vector3(0, 0, 0), Color.white, new Vector2(0.5f, 0));
  12. toFill.AddVert(new Vector3(0, 100, 0), Color.white, new Vector2(0.5f, 1));
  13. toFill.AddVert(new Vector3(100, 100, 0), Color.white, new Vector2(1, 1));
  14. toFill.AddVert(new Vector3(100, 0, 0), Color.white, new Vector2(1, 0));
  15. toFill.AddTriangle(0,1,2);
  16. toFill.AddTriangle(0,2,3);
  17. }
  18. }