- Home /
 
               Question by 
               GhostDre · Mar 03, 2015 at 12:15 PM · 
                guitouchguitexturetouchphase  
              
 
              Input.Touch gui.Texture button positioning off
Hi everyone, I'm a little stumped on problem I have been having since I've been building this Android game. I made a pause menu that consist of gui.Texture buttons. Now everything works within the code, it's just that when I touch above a button it does what it needs to do.


That's not a good thing. I want it where as to when you touch exactly the gui.Texture it does something. If you touch above or below or the sides of the button it does nothing. I don't know if it's a graphical problem (in which I tried to resize it and crop it and still nothing), or it's with in my code. Maybe I'm suppose to position the touch. Any Suggestions??????
 if(isResume){
             if (Input.touchCount > 0) {
                 
                 for (int i = 0; i < Input.touchCount; i++) {
                     
                     Touch touch = Input.GetTouch (i);
                     
                     if (touch.phase == TouchPhase.Began &&
                         resumingTexture.HitTest (touch.position)) {
                         Time.timeScale = 1.0f;
                         isPaused = false;
                         
                         resumingTexture.enabled = false;
                         mainMenuTexture.enabled = false;
                         pauseBackgroundTexture.enabled = false;
                         settingTexture.enabled = false;
                         soundTexture.enabled = false;
                         facebookTexture.enabled = false;
                         checkpointTexture.enabled = false;
                         backTexture.enabled = false;
                         
                         mainMenuText.enabled = false;
                         resumeText.enabled = false;
                         settingText.enabled = false;
                         soundText.enabled = false;
                         facebookText.enabled = false;
                         checkpointText.enabled = false;
                         backText.enabled = false;
 
 
                     }
 
                 }
 
             }
         }
 
 
                 
                pausemenu.png 
                (139.8 kB) 
               
 
                
                 
                pausemenu2.png 
                (139.3 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                