Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Apr 08, 2013 at 10:24 AM by Fattie for the following reason:

Duplicate Question

avatar image
-1
Question by Divyang Metalia · Apr 08, 2013 at 10:06 AM · spritetouch2dtoolkit

Sprite Touch and Drag in 2dToolkit

Hi, I make one simple 2d game using 2d toolkit. In my game i add many sprite in my play scene and that all using single script. In this game i want to move sprite by touch event. when i touch any sprite how to find which sprite touch?

Thanks in advance.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Graham-Dunnett ♦♦ · Apr 08, 2013 at 10:08 AM 0
Share

Down-voited because this is answered in the documentation.

1 Reply

  • Sort: 
avatar image
2
Best Answer

Answer by Graham-Dunnett · Apr 08, 2013 at 10:09 AM

http://docs.unity3d.com/Documentation/ScriptReference/Input.GetTouch.html

Look at the first example, which shows "Moves object according to finger movement on the screen".

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Divyang Metalia · Apr 08, 2013 at 10:39 AM 0
Share

thnx for ans

sry for my weak English.

i make game in 2d toolkit.

but my que is for example 100 sprites on my scene then which sprite touch that how can find.

i also try raycast but that didn't work in sprite but working unity object.

avatar image Fattie · Apr 08, 2013 at 01:14 PM 0
Share

Ahh !!

definitely consider the 2dToolkit forum, it is great

http://2dtoolkit.com/forum/index.php

you will get a full answer quickly

Also, you could even email the 2DToolkit guys, they are great

Also consider this long answer about using a POOL ...

http://answers.unity3d.com/questions/321762/how-to-assign-variable-to-a-prefabs-child.html

avatar image Fattie · Apr 08, 2013 at 01:14 PM 0
Share

your English is great

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Stretch sprite to a position (finger position) 1 Answer

How do i mask a sprite so that it is only visible on another moving sprite? 0 Answers

Wrong Texture when make IOS build 0 Answers

Overlapping objects increase drawcalls in 2DToolkit 0 Answers

Texture2D Power of 2 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges