How to make a drag and drop game in Unity

preview_player
Показать описание
I'll show you how to quickly get your drag and drop game up and running while teaching you a few key Unity concepts along the way, such as:

Drag & drop
Detecting proximity (distance between objects)
Playing sounds

=========

=========



0:00 Intro
0:11 Creating the prefabs
1:05 Drag and drop the puzzle piece
7:28 Setting up the slot
9:14 PuzzleManager (spawning pieces)
11:45 Selecting random list elements (puzzle pieces)
16:45 Dropping the pieces into the slot
Рекомендации по теме
Комментарии
Автор

Love your videos. So simple, but so helpful. They nail down the basics with easy to follow examples.

rhalferty
Автор

A good note for everyone, if you are trying to use this scripts for moving objects in a canvas, use OnPointerDown instead of OnMouseDown because canvas is a different element that in Unity terms is not inside screen so detecting mouse position in canvas will get confused

daniellaplanagimeno
Автор

I don't usually comment but this was great man. I work as an IT Manager for a school and I'm learning to use Unity to build some games for the kids. This was super helpful. Keep it up please! 💪💪

fuzeworksit
Автор

I recently found your channel... you are my new favorite Unity Dev channel!
I'm working on a Mobile Kids Game and this is perfect! Love your content!

jadonmullinex
Автор

Thanks for the lesson, the only remark is that in the middle of the lesson we started making Spawn Manager without completing the implementation of drop, because of this it was hard to go down from one implementation to another. I think it was necessary to do Drag and Drop first and then show how to implement it through Spawn Manager.

USSR-Lenin-Stalin-Forever
Автор

This helped me start on a food assembling game! Thank you for uploading this video!

amelialewey
Автор

Tarodev: "Hopefully this helped you on your way to making whatever game it is, probably a kiddy game..."



Meanwhile, here's me using what I learned from this video to swap weapons and ammo types around in my endless shooter game 👀

Aurillia
Автор

Thank you so much for this! This is awesome :) If you'd be so kind to help:
How would you spawn just one set of slot + piece (e.g. the #1 slot and #1 piece) instead of a random number from a list?

Ottiya
Автор

Now I know how to add sounds to my game. :)

noobcraft
Автор

hi, this is a great tutorial, thank you so much! you're awesome

keziavb
Автор

thank you so much for such wonderful and easy to follow tutorial.. waiting to see another kids game tutorial, maybe coloring games?

fitriyansyah_
Автор

Thanks man, your video is my lifesaver

vietanhnguyen
Автор

Thank you! Perfect clip!!! Awesome! AMAZING!

alanadonascimentofreitas
Автор

Can you make a video on how you made such good graphics in unity 3d ?

andubunea
Автор

I have a question, why when you pull the image to the work screen does it look like SPRITERENDERER? Because when you pull an image it is only set as an image, is it possible that you have your Unity development environment configured differently? Or is it different in the new versions?

rubenvictorcallacondobeliz
Автор

this is a great tutorial, but I was just wondering how could I make a good ending for a game like this? Like how to maybe restart or make something nice happen on a screen after every piece have been moved to their right slots? And I am still a beginner so I am not sure in what script something like that needs to be written? Maybe the manager?

katilehtonen
Автор

How did you export it to a phone or a table?

jayskylark
Автор

Hi thank you so much for the video...how do I rearrange the puzzle piece

shuganyaravi
Автор

can u plz share the github link as well?

navodyaliyanage
Автор

That's great, thank you!!!! But how to finish this game, I mean It would be nice to see the next level (scene) or a win panel after we fullfill empy slots. How to do this?

MstrDennis