[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Форум » Programming » Скрипты » How to made a touch button Unity3d
How to made a touch button Unity3d
-=Deatrocker=-Date: Thursday, 01.08.2013, 23:53 | Message # 1
Нагибатор
Group: Администраторы
Messages: 19
Awards: 1
Reputation: 1
Status: Offline
First of all you need to drop this script to GUITEXTURE

  • function Update()
  • {
  •     var count : int = Input.touchCount;
  •    
  •     for(var i: int = 0;i < count; i++)//for multi touch
  •     {
  •         var touch : Touch = Input.GetTouch(i);
  •    
  •         if(guiTexture.HitTest(touch.position) && touch.phase == TouchPhase.Began)
  •         {
  •             print("Red Button Clicked or EVEN BETTER AWESOME STUFF!");
  •         }
  •     }
  • }


  • Город несбывшихся надежд
  •  
    Форум » Programming » Скрипты » How to made a touch button Unity3d
    • Page 1 of 1
    • 1
    Search: