My AssetStore Link

I've moved - GO TO THE NEW WEBSITE

Unity Store Link - Click to see all the Song's work that has been put on Unity AssetStore




Friday, 27 April 2012

Input.Touches



Introducing "Input.Touches", my latest addition to Unity AssetStore. It is aimed to be a low cost, easy to use helper library for Unity3 touch (and mouse) input. The library uses event system to signal various input event. Let the user by pass the need to deal with coding of the input.

So in a nutshell, this is what comes with the package:
  • Support various gesture: swipe, pinch, drag, rotate, double tap, long tap, short tap, charging, on up, on down, single finger, two fingers...
  • Uses event system, keep things simple.
  • Support both JS and C#.
  • Tested and works on PC and IOS device.
  • Various example scene with documented code.
  • Comes with support of a dedicated developer. :)
Also please feel free to try out the demo.

I know this is not the first package of it's kind on the AssetStore. And there are some very successful package of this sort on the Store. FingerGestures *cough*. Trust me I'm not jumping on the bandwagon and I havent purposely spent a lot of time to put this package together. Most of the content has been done way before. I have actually spent a month or more working on a multi-touch project for research purpose. That's where the most of the multi-touch gesture and camera stuff get done. Also TDTK also contain such touch input and gesture element for camera manipulation. Well there, I've said it, this is a recycle content from my past project.

Still I recon it would do some good out there. I'm pricing it pretty low at $20 and I do plan to add more content to it. And I'm prepare to provide good support to the user. Just like how I did with TDTK's users. :)

Well I'll stop here. Here's a link to the Unity AssetStore. Feel free to leave a comment here or at the official forum thread on Unity forum.

7 comments:

  1. Hi Song,

    I just purchased and got it up and running in short matter, glad I can reuse your code instead of having to write it myself. I just have a few suggestions:
    1) In TapDetector.cs, on lines 46, I had to add " && (!UNITY_EDITOR)" and I had to uncomment the "|| UNITY_EDITOR" on line 115. I suspect the same issue in the other modules, but I don't need them for now. The reason is that I need to test in the editor but am running an Android build setting so UNITY_ANDROID is true.

    2) I would recommend combining some code in this module (maybe others?). There are several repeated lines. You could say "bool down; #if ANDROID, down = whatever #elif !ANDROID down = GetMouseDown(0). Then the code below it would be common and just use the local down variable.

    3) I wasn't quite sure right away how to get this working, but I opened the sample and saw a global game object with several scripts attached and saw setting the event in the demo script, so I followed this and got it working (after I fixed the UNITY_EDITOR above). I would just recommend posting somewhere a quick "how to" for getting started. Maybe a nice addition would be a button in the menu system that says "Create input manager object" or something like that to create the global object with the Gesture, General, etc scripts attached.

    Thanks, still looks to be one of the better solutions from the store that I can see.
    Chris

    ReplyDelete
  2. Thanks Chris. Really useful tips there.

    I've explained the platform dependant compilation code section (your first point) in unity forum Thread. Check it out here. In short, you can only have either one of mouse(your fix) or touch(default) input working when the target platform is switched to iOS or Android.

    I'll consider you suggestion and try to see if I can do something in the next update.

    Thanks again!

    ReplyDelete
  3. Hi I bought input touches. It is awesome.

    Is there a way to drag multiple items with the tap demo on ios?

    ReplyDelete
  4. Thanks for your custom! :)

    Unfortunately current version doesn't support multiple concurrent event just yet. But I've been working on an update which will allow that. Won't be long before that update is released now. I aim to get it done by this weekend, the latest by next. Make sure you stay tuned to this blog or the official support thread on Unity forum.

    ReplyDelete
  5. hi

    i recently purchased this plugin.
    and i am getting an error BCE0005: Unknown identifier: 'Gesture' while i use it in a javascript.

    ReplyDelete
  6. Hi Valan,

    I got similar post on the Unity support thread. Wondering if it was you. At any rate I'll tell you the same thing I wrote there.

    I will need more information to know exactly what went wrong. Where is the js file that causes error being placed, under which folder? Fyi, It cannot be placed in any folder under the hierarchy of folder named "Plugins" or "Editor". To be safe, please try placed it along the js example. Finally please do not move the InputTouches files in folder named "Plugins" or indeed the folder itself.

    Hope this helps

    ReplyDelete
  7. Song,
    For some reason I'm locked out of Unity forums (they are working on the issue). In the meantime, I'm still trying to fix a big touch screen problem. Simply put if you load the RTS demo scene and tap the screen at various locations, sometimes the camera orbit spins crazy fast and settles. I only need orbit on drag not tap. This is messing up my demo where I have a menu with many buttons (clickable quads) and at times, selecting a menu button makes my demo spin crazy. can you email me at ken.geary@honeywell.com? thank you, Ken (I know, the user name is John Smith, I use that for dev work)

    ReplyDelete