Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class TTT : MonoBehaviour {
  5.  
  6. // Use this for initialization
  7. void Start () {
  8.  
  9. }
  10. public string text = "test";
  11. void OnGUI(){
  12. text = TextField(new Vector2(10,10), new Vector2(100,100), text, new Font(), Color.green);
  13. }
  14.  
  15. public static string TextField(Vector2 topLeft, Vector2 size, string text, Font font, Color color){
  16. //SetupStyle(instance.textFieldStyle, font, color, TextAnchor.MiddleLeft);
  17. return GUI.TextField(new Rect(topLeft.x, topLeft.y, size.x, size.y), text/*, instance.textFieldStyle*/);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement