2013-10-01 1 views

답변

0

나는 알아 낸다. 터치 스크린 POS를 가져와 이동 범위를 설정해야한다.

scrollPosition1 = GUI.BeginScrollView(Rect (0,400,Screen.width,175),scrollPosition1, Rect (0, 0, 650, 0)); 
     // touch screen 
     if (Input.touchCount==1 &&Screen.height -Input.GetTouch(0).position.y > 450 - scrollPositionHome.y && Screen.height - Input.GetTouch(0).position.y < 600 - scrollPositionHome.y) 
     { 
      var touchDelta2 : Vector2 = Input.GetTouch(0).deltaPosition; 
      scrollPosition1.x +=touchDelta2.x; 
     } 
     GUI.skin.font = fnt; 
     style.normal.textColor = Color.black; 
     style.alignment = TextAnchor.MiddleRight; 
     for (i=0;i < ImgSliderProducts.Length;i++) 
     { 
      GUI.DrawTexture(Rect(20+(i* 100),10,100,100), ImgSliderProducts[i],ScaleMode.ScaleToFit,true); 
     } 
GUI.EndScrollView(); 
관련 문제