Author Topic: Drag workin on iOs  (Read 1250 times)

realler

  • Guest
Drag workin on iOs
« on: October 27, 2013, 04:20:28 AM »
Hi,

 I have a problem on drag and drop functionlaty. The main problem is, it is not working on iPhone5 (which has ios7). I could use it on android and windows but not working on iPhone. In below you could find my codes. Does anyone knows how to solve it?

Quote
        private bool isDown = false;
        //This is only selection part and it works in all
   public void OnPress () {
      Debug.Log("mouse Pressed");

      if(!isDown){
      if (target) target.SendMessage("OnClickAction", this, SendMessageOptions.DontRequireReceiver);
         isDown = true;
      }
      else
      {
         isDown = false;
      }

   }
   //This is drag part, but it didn't work. Mouse drag Threshold and touch drag Threshold is 5.
   public void OnDrop (GameObject drag)
   {
      Debug.Log("mouse dropped");

      
      if (target) target.SendMessage("OnClickAction", this, SendMessageOptions.DontRequireReceiver);
      
      
   }