Simple Drag Drop (Unity Tutorial for Beginners)

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2019
  • ✅ Get the Project files and Utilities at unitycodemonkey.com/video.php...
    Let's make a very simple Drag and Drop in Unity, great for an Inventory System.
    Simple Inventory System in Unity (Store, Use, Stack and Drop Items)
    • Simple Inventory Syste...
    If you have any questions post them in the comments and I'll do my best to answer them.
    🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
    See you next time!
    🤖 Join the Community Discord / discord
    📦 Grab the game bundle at unitycodemonkey.com/gameBundl...
    📝 Get the Code Monkey Utilities at unitycodemonkey.com/utils.php
    #unitytutorial #unity3d #unity2d
    --------------------------------------------------------------------
    Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.
    I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
    You can see my games at www.endlessloopstudios.com
    --------------------------------------------------------------------
    - Website: unitycodemonkey.com/
    - Twitter: / unitycodemonkey
    - Facebook: / unitycodemonkey

ความคิดเห็น • 646

  • @CodeMonkeyUnity
    @CodeMonkeyUnity  4 ปีที่แล้ว +40

    Here's a really simple video on something that is extremely useful! Inventories, Skill Bars, etc.
    Play 7 Awesome Games (Action, Strategy, Management) and Help Support the Channel!
    Get the Game Bundle 67% off unitycodemonkey.com/gameBundle.php

    • @lexmakes
      @lexmakes 4 ปีที่แล้ว +4

      @CodeMonkey, hey! Thanks for this! Can you help? eventData.pointerDrag.GetComponent().anchoredPosition = GetComponent().anchoredPosition; dont work in Grid Layot Group. How fix it?

    • @courageafbet2607
      @courageafbet2607 4 ปีที่แล้ว +2

      That's great , I would like to know how to allow a dragged object to remain locked once it is on its correct position so that one cannot be allowed to move it again.

    • @aurelienlerochbermuda6600
      @aurelienlerochbermuda6600 4 ปีที่แล้ว +1

      @@lexmakes Try to use eventData.pointerDrag.GetComponent().position = GetComponent().position; work for me

    • @DjagoMorshosties
      @DjagoMorshosties 4 ปีที่แล้ว +3

      better you use transform.position = Input.mousePosition;
      then you don't need to worry about canvas scaling etc.

    • @ryana.9821
      @ryana.9821 4 ปีที่แล้ว +1

      @@DjagoMorshosties Thank you, saved some of my hair from being rippedout.

  • @tjaartvanderwalt81
    @tjaartvanderwalt81 3 ปีที่แล้ว +8

    This 10 minute video saved me probably three hours worth of effort, thank you very much.

  • @Shrarder0000
    @Shrarder0000 3 ปีที่แล้ว +22

    The events explained by you are just fascinating, this guided me a lot and helped me make a custom inventory for my game!

  • @timurnurlygayanov3208
    @timurnurlygayanov3208 3 ปีที่แล้ว +7

    So simple and nice! After 10 hours spent for my experiments with drag and drop you show me how to do this with a few lines of code... Thank you!

  • @robmattson
    @robmattson 3 ปีที่แล้ว +4

    Thank you so much for making this video. I've been going crazy for an hour trying to get OnDrop events to trigger by messing with Override Sort Order, but what I really needed to do was add a CanvasGroup and blockRaycasts as per your video. THANK YOU!

  • @joshuadrewlow
    @joshuadrewlow 3 ปีที่แล้ว +5

    Using those interfaces is really neat! Thanks a ton for this amazing tutorial 👏🏻 To implement a whole drag n drop inventory is a hell of a project but it so much worth it once it is up and running. 😎

  • @dio8440
    @dio8440 4 ปีที่แล้ว +5

    Your videos are always on point, best topics 👌

  • @TMosier88
    @TMosier88 2 ปีที่แล้ว +9

    If anyone is finding this video (because CM is amazing and you should be finding them) and trying to do this with the new Input system. Go to your camera and add a Physics Raycaster OR Physics 2D raycaster to your camera first. Then the events they are showing you will work. (If not using UI, I believe you may need to add a collider to the object)
    Hope this helps someone!

    • @sparfild701
      @sparfild701 2 ปีที่แล้ว +1

      Thanks ! I almost gave up this tutorial in the 2 first minutes because it wouldn't show me the events

  • @mertcanguven1326
    @mertcanguven1326 ปีที่แล้ว +1

    Clean, simple and overall a perfect video! Appreciated a lot.

  • @personalgamedevyt9830
    @personalgamedevyt9830 8 หลายเดือนก่อน +3

    Thank you CodeMonkey as always! I made a slightly different variation that uses Triggers for the itemSlot to talk with the DragDrop class to tell it where to place the item if any part of the item enters the ItemSlot rather than just the mouse cursor.
    It's really awesome seeing your way of doing it, and discovering another way of doing it to fit my specific desires!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  8 หลายเดือนก่อน +4

      Awesome! That's exactly what I hope people do with these tutorials, take them as a base and apply them to their specific use case, nice job!

  • @kleinerobin4663
    @kleinerobin4663 4 ปีที่แล้ว +9

    YEeEeEeEeeeeEEEsS! OMG thank you so much this is exactly what I needed!

  • @martinds93
    @martinds93 3 ปีที่แล้ว +1

    One of the best Unity channels of TH-cam...

  • @mboog12
    @mboog12 ปีที่แล้ว +6

    Thank you for the tutorial. It's very concise and helpful.
    A small tip: you don't need to add a canvas group to block raycasts for the dragged object, just grab its image component and set raycastTarget = false;

  • @zezooalzezoo5200
    @zezooalzezoo5200 2 ปีที่แล้ว

    Where ever i search about something, i find u immediately 😧, u are legendary man thank u a lot 🙏

  • @OPTactics
    @OPTactics 2 ปีที่แล้ว

    You have some of the best tutorials! Great job!

  • @Zyugo
    @Zyugo 2 ปีที่แล้ว

    Man, I had troubles getting DragDrop to work properly especially when I get into the NRE, long before I found this tutorial and adapted it to my code and made it work just the way I wanted. Thanks, Code Monkey.

  • @EspiritoDoLugar
    @EspiritoDoLugar 4 ปีที่แล้ว +1

    👏🏾👏🏾👏🏾👏🏾👏🏾
    Great great tutorial!
    Fast and objective.
    Thank you!!

  • @jean-michel.houbre
    @jean-michel.houbre 3 ปีที่แล้ว +1

    Super clear, and very easy to use. Thank you Master.

  • @n0expressi0n16
    @n0expressi0n16 4 ปีที่แล้ว +4

    amazing tutorial as always

  • @fedhori4407
    @fedhori4407 4 ปีที่แล้ว

    Thank you for your well-made videos. It always help me a lot.

  • @itaylorm
    @itaylorm ปีที่แล้ว

    I found this very helpful getting my own implementation working. Thank you!

  • @theplaymakerno1
    @theplaymakerno1 13 วันที่ผ่านมา

    This man, without a doubt, creates some of the best tutorials. His tutorials are easy to follow and are very useful. Stay blessed, Code.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  11 วันที่ผ่านมา

      I'm glad my videos have helped you! Thanks!

  • @Brunoenribeiro
    @Brunoenribeiro 3 ปีที่แล้ว

    You got the best unity tutorials out there... fantastic content!

  • @user-sn8lw
    @user-sn8lw 4 ปีที่แล้ว +2

    Thank you man. You're best

  • @manicmillennial3287
    @manicmillennial3287 4 ปีที่แล้ว +4

    Thank you Code Monkey! :D

  • @nemanjakomar1422
    @nemanjakomar1422 4 ปีที่แล้ว

    Thank you so much! You probably saved me days of work

  • @DannyBoy443
    @DannyBoy443 ปีที่แล้ว

    See, THIS is useful and quick game dev I love. I learned more here about game dev then I did on the first few videos of a Udemy course lol. Thanks

  • @gmangman123
    @gmangman123 2 ปีที่แล้ว +1

    thx for tutorial dude! This iş very useful!

  • @user-sr1dn6vj2n
    @user-sr1dn6vj2n ปีที่แล้ว

    Great video this has really helped me with my drag and drop game. Thank You so much.

  • @FlexFoundry
    @FlexFoundry 3 ปีที่แล้ว +1

    Thank you very much! Very helpful, also did not know about OnDrop haha.

  • @apothekerrie
    @apothekerrie ปีที่แล้ว

    So amazingly helpful! Thank you.

  • @cwdgamedev822
    @cwdgamedev822 ปีที่แล้ว

    Another banger... Thanks Code Monkey!

  • @mohammadalkhalailah7395
    @mohammadalkhalailah7395 4 ปีที่แล้ว

    Great job as always , thanks.

  • @dankel317
    @dankel317 2 ปีที่แล้ว

    this is how a good tutorial should be! thank you for making this so easy to understand! :)

  • @aussieraver7182
    @aussieraver7182 2 ปีที่แล้ว

    Helpful as always, thanks!

  • @RecOgMission
    @RecOgMission 3 ปีที่แล้ว +2

    Hi again @Code Monkey. Another great tutorial with something I need! Thanks again.
    I have one problem, though. It seems when the item is in a hierarchy under the canvas that doesn't end up with a unit scale (the rectTransform, not the Canvas), the dragging happens to slow or fast. You have to divide by the "cumulative scale" of the rectTransform, but you can't use lossyScale, since I think it also takes into account the scale of the canvas and part of the hierarchy above it as well. It also doesn't work to use only lossyScale and ignore the canvas.scaleFactor.
    Any ideas?

  • @EyalDeutscher
    @EyalDeutscher 2 ปีที่แล้ว

    Thank you so much! look for that info all day

  • @1lsgaming27
    @1lsgaming27 4 ปีที่แล้ว +2

    I might not need this now But I'll keep it for a future project. Thanks!

  • @karficzfrizack2711
    @karficzfrizack2711 4 ปีที่แล้ว +19

    If you are using the new Unity Input Sytem this wont work by default. You need to go to Edit --> Project Settings --> Player --> Other Settings --> Change the setting "Active Input Handling" to both.

    • @markaj_
      @markaj_ 4 ปีที่แล้ว +3

      still doesn't work

  • @elliejayliquid
    @elliejayliquid 3 ปีที่แล้ว

    Thanks, exactly what I was looking for! Didn't know there was an OnDrop event :)

  • @457Deniz457
    @457Deniz457 4 ปีที่แล้ว +2

    Ohhhh really usefull thanks ! :)

  • @ksepastremenos
    @ksepastremenos 3 ปีที่แล้ว +73

    Tip: by default unity has a threshold on drag, meaning the object starts following after the mouse has moved an amount in some direction.
    To avoid this and have the object move exactly under where you click, you need to implement the *IInitializePotentialDragHandler* interface and inside *OnInitializePotentialDrag* set *eventData.useDragThreshold = false*

    • @peterferencz
      @peterferencz 3 ปีที่แล้ว +1

      ty

    • @turnip4073
      @turnip4073 2 ปีที่แล้ว +3

      I was going crazy trying to figure out why there is such a delay/lag when I drag even using the script exactly.
      I added IInitializePotentialDragHandler
      public class DragnDrop : MonoBehaviour, IPointerDownHandler, IBeginDragHandler, IEndDragHandler, IDragHandler, IInitializePotentialDragHandler
      and
      public void OnInitializePotentialDrag(PointerEventData eventData)
      {
      eventData.useDragThreshold = false;
      }
      But that didn't fix the problem sadly. Is this what you meant with your advice? Thanks!

    • @QaziTV
      @QaziTV 2 ปีที่แล้ว

      Thank you so much! Came to the comments looking for this exact issue!

    • @akstis4183
      @akstis4183 2 ปีที่แล้ว

      THAT'S WHAT I WAS LOOKING FOR, THANK YOUUUUU

    • @anupammahajan7540
      @anupammahajan7540 ปีที่แล้ว

      It works for Mouse but there is still Drag threshold when using it for touch screen. any idea ... anyone , why ?

  • @Sermmy99
    @Sermmy99 4 ปีที่แล้ว +1

    you are a lifesaver. Thank you

  • @hoseinabdl3263
    @hoseinabdl3263 3 ปีที่แล้ว

    great!! thank you,you really helped me!

  • @MateoAlbertoGarcia
    @MateoAlbertoGarcia 3 หลายเดือนก่อน

    I just wanted to say thank you so much for the video! This tutorial helped me along the way with my thesis work so I am especially grateful

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  3 หลายเดือนก่อน

      I'm glad it helped! Thanks!

  • @adhochero6619
    @adhochero6619 2 ปีที่แล้ว

    thanks a ton, im trying to make a card game and I need to drag and drop and this works great

  • @animanecro8155
    @animanecro8155 2 ปีที่แล้ว

    Thank you so much for this!

  • @darkdoom907
    @darkdoom907 2 ปีที่แล้ว

    By all means, this saved me life

  • @maltedwheaties3339
    @maltedwheaties3339 3 ปีที่แล้ว

    How do you adjust this for a two-block wide draggable object? I am using this for a 2D platformer where you drag blocks (sprites with colliders) using a world-space canvas. I have item slots in a 10x10 grid, and have the 1x1 draggable objects (the potion in this tutorial) working well. How would you modify the code to allow for different shape blocks?
    Thanks

  • @JohnDoe-xi6df
    @JohnDoe-xi6df 2 ปีที่แล้ว +1

    Good work! Thanks :)

  • @coutnico-f9265
    @coutnico-f9265 2 ปีที่แล้ว

    We all love you CodeMonkey, just know it :D

  • @MarkFilliph
    @MarkFilliph 2 ปีที่แล้ว +2

    Excellent explanation! Thank you for sharing!! My snapping worked using GetComponent.position instead of GetComponent().anchoredPosition...
    Is there any way to compare if the Obj is not on ItemSlot would be transformed to its initial position? For example, if I drop the draggable obj in another position in the scene that is not the ITemSlot, I want the draggable obj set to its initial position.

  • @ee.4021
    @ee.4021 2 ปีที่แล้ว

    Thank you very much for the tutorial

  • @danilocazaroto7545
    @danilocazaroto7545 ปีที่แล้ว

    Awesome tutorial Code Monkey 🙇🏻‍♂👏
    Thanks for it 🤝

  • @1501minhhuy
    @1501minhhuy 2 ปีที่แล้ว

    Thank you ! You save my day !!!!

  • @shirohitsugaya3032
    @shirohitsugaya3032 4 ปีที่แล้ว

    I have 2 questions:
    1.I followed your Simple inventory tutorial and successfully applied it to my game, i can successfully clone the itemSlotTemplate but when i attempt to clone the itemDropTemplate/dropHandler you made in this video. I can't seem to instantiate it like what i did with itemSlotTemplate. How did you do it?
    2.When I use the DragHandler function, the item accurate follows my mouse vertically but when i drag it horizontally the item is being left behind?

  • @ayoubchari242
    @ayoubchari242 4 ปีที่แล้ว

    THANK you , you ask we when this video is helpful....! Is more than helpful...!!!

  • @speedrob
    @speedrob 4 ปีที่แล้ว +7

    As always good stuff... might mess around with this one and tailor it toward more dragging from the inventory and placing traps within a radius of the player and if it's not colliding with anything.
    Much better than my current way, click on the item (this case a mine) an it places at your current position.
    Very cool stuff thou man.

  • @kpickett9128
    @kpickett9128 ปีที่แล้ว +6

    in case any other UI noobs out there run into the same issue...
    my console wasn't showing any click event debug messages-- the problem was i tried to make my own canvas by making an Empty and adding a Canvas component to it -- which is not the right way to go about it. : )
    To solve this, go to the hierarchy and right click > UI > Canvas. This will generate a good Canvas with a graphic raycaster, and an Event System, both of which are needed for these scripts to work as shown!

    • @reivaxcorp
      @reivaxcorp 11 หลายเดือนก่อน +2

      Thanks so much. ;)

    • @lrizzard
      @lrizzard หลายเดือนก่อน +1

      You can also add a solo Event System from right click > UI > Event System if yours is missing for some reason.
      (When you copy paste a canvas from a different scene for example :))

  • @suryaelz
    @suryaelz 2 ปีที่แล้ว

    Very cool, thank you!

  • @oldcat1790
    @oldcat1790 4 ปีที่แล้ว +1

    Very clean guide. The only thing it misses is ability to work with the new input system.

  • @muhammadkhalilshafiq1465
    @muhammadkhalilshafiq1465 4 ปีที่แล้ว

    Great! Helps a lot :)

  • @UgurGulser
    @UgurGulser 4 ปีที่แล้ว

    Thanks, very clear

  • @user-by3zr4oz1s
    @user-by3zr4oz1s 2 ปีที่แล้ว

    Super Thank you!!

  • @RTWrename
    @RTWrename 3 ปีที่แล้ว +1

    ok then so now, how can I use this to instanciate an object in the map? and to store it in back to inventory? for example with the mouse

  • @TheWorldsprayer
    @TheWorldsprayer 2 หลายเดือนก่อน

    May the gaming gods bless you. I was having issues with items not dragging at same speed, it was the scale factor.

  • @katjalua
    @katjalua 3 ปีที่แล้ว

    Hi! Great tutorial!
    How can I make sure that the right object can only be dropped into the right box when I have multiple objects and boxes? It should be possible to change the correct box for each item in the inspector.

  • @vedantsawant8527
    @vedantsawant8527 4 ปีที่แล้ว +2

    Amazing video!! Everything worked out well !! Can you please tell how can I make multiple objects to fill in multiple slots. When I tried it, it didn't work !! Is there any way to do this multiple times in a scene ?

  • @ShaneP427
    @ShaneP427 4 ปีที่แล้ว +1

    This is maybe the best tutorial I've ever come across. It feels like the guy is an actual expert, rather than just a hobbies who decided to try putting up a few videos. I learnt a tonne, including how to use the EventSystem properly. (I've been adding colliders that I don't really need.) Really good work.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว

      Thanks! I'm glad you found it helpful!

  • @harryle1989
    @harryle1989 3 ปีที่แล้ว +1

    I have a bit of a problem that when dragging and dropping the item "code itemslot" I don't get an object when dragged in. Help me please.

  • @DrRoncin
    @DrRoncin 3 ปีที่แล้ว

    Excellent tutorial.

  • @yudoball
    @yudoball 3 ปีที่แล้ว

    thanks it works!

  • @Future_Guy
    @Future_Guy 2 ปีที่แล้ว

    Any way to implement this when the pointer is not over the drop object but the item you are dragging is? Like any part of the dragged item is over the drop zone (but the pointer itself is not) ... I feel like some hover function would work here or perhaps a bounds check?

  • @y4ni608
    @y4ni608 ปีที่แล้ว

    Great tutorial !

  • @tohedul111
    @tohedul111 3 ปีที่แล้ว

    Hi, I want to add and drag and drop object only between the tilemap's tile. Can you suggest to me how can I achieve that with an example?

  • @danielvilla5070
    @danielvilla5070 4 ปีที่แล้ว +1

    Hi, great tutorial, is it possible to this vuforia for augmented reality app ? Thank you in advance

  • @averageenjoyer301
    @averageenjoyer301 3 ปีที่แล้ว

    Hey very cool video!! Is their a way to restrict the drag and drop to one axis, so that you can move the item along the x but not the y axis for example?

  • @rewelmejiaestrella5979
    @rewelmejiaestrella5979 3 ปีที่แล้ว +1

    hey man, awesome video, but i got a question i'm using this method on an android device but the OnDrop is not being called... but everything is fine in the editor, so do you have a suggestion ?

  • @Prod.ByMoonlight
    @Prod.ByMoonlight 2 ปีที่แล้ว +2

    Hi Codemonkey I have a problem,
    I have done everything exactly as in your video but my item goes too far over the mouse, even tho i have the: rectTransform.anchoredPosition += eventdata.delta / canvas.scaleFactor;
    No errors and it works, but only this little bit doesnt(i also have debug.log done and it triggers the event)

  • @gamedevbaiyi936
    @gamedevbaiyi936 2 ปีที่แล้ว

    Thank you!!!

  • @sooanlu27
    @sooanlu27 3 ปีที่แล้ว

    You save my day

  • @aihoom2011
    @aihoom2011 4 ปีที่แล้ว

    That is Great.. but if i have two objects how and tried to drag it is becoming behind.. how to make the draged object always on top. thanks

  • @queenangie2900
    @queenangie2900 3 ปีที่แล้ว

    does this work for touch controls like on ipads or is it just on computer clicks?

  • @NEFxDEF
    @NEFxDEF 4 ปีที่แล้ว +2

    How do you use this on multiple item slots instead of just 1?

  • @tomko258TV
    @tomko258TV 4 ปีที่แล้ว +1

    Months ago i wanted to implement this system, but i had problem with scrollable ui. Basically if you wanted to scroll, you had to drag ui vetrically and drag in others directions, when u wanted to drag object out. But this was much time consuming, so i implemented buy button instead. :D

  • @illusionsofthegrave1274
    @illusionsofthegrave1274 2 ปีที่แล้ว

    Thanks for outlining the basics! This is super helpful. I'm trying to add onto this stating "If image 1 is dropped onto image 2, show image 3. Else, show message" but it seems to be a little out of my technical expertise. Any tips help!

  • @isakgo7492
    @isakgo7492 2 ปีที่แล้ว

    감사합니다 덕분에 유니티 개발이 재밌어졌어요

  • @michaeldeleo469
    @michaeldeleo469 4 ปีที่แล้ว

    Hold would you implement a "Long Press" feature to this? Would you use a Coroutine? I tried to add one under the OnBeginDrag function but got errors...
    Any help would be awesome.
    Thank you so much for the amazing tutorial!

  • @jaicarey7023
    @jaicarey7023 ปีที่แล้ว

    Great tutorial!
    Just a quick editor bug that I discovered. If the editor is not focused (i.e. you tabbed out and back in) the scale factor of the canvas is incorrect.
    In my specific case, I have my editor set to play in Unfocused mode which caused this particular error. If you focus the editor by clicking anywhere, then drag the object, it will work.
    (edit): As an aside, this video helped me setup my UI and its customization to exactly how I wanted. So quick and easy! Thank you again!!!

  • @phambaoha170
    @phambaoha170 4 ปีที่แล้ว

    thank you man!

  • @elementz301
    @elementz301 2 ปีที่แล้ว

    Everything works but whether or not OnDrop triggers is really inconsistent. Does the object utilizing OnDrop need to be under your mouse, or under the origin of the object being dropped?

  • @MwdCraft
    @MwdCraft 3 ปีที่แล้ว

    thanx so much

  • @kawaiiVietCong
    @kawaiiVietCong ปีที่แล้ว

    I have a inventory system where each slot object has a background image and a child item image. When I drag the item image of a slot over others slot that are rendered before the source slot in the hierarchy the image just go behind the background image of those slots. Should I just make a seperate canvas for each item image or is there a better way to solve this

  • @denisgoodman4492
    @denisgoodman4492 3 ปีที่แล้ว +1

    Cool But :) 9:28 will work only if item & ItemSlot have Pivot set to Middle & Center?

  • @joebonds3072
    @joebonds3072 3 ปีที่แล้ว

    Do all these interfaces work with touch too? Or just the mouse?

  • @gautamnalawade8584
    @gautamnalawade8584 4 ปีที่แล้ว

    How to know when an item is dragged out of the itemSlot?
    And also if we drop another item, the existing item must replace...

  • @jiwkis
    @jiwkis ปีที่แล้ว +1

    When I drop the item it takes the reference from the canvas not from the slot, what should I do? I'm using a panel to store the slots.

  • @michaelsong741
    @michaelsong741 4 ปีที่แล้ว +5

    Hey Code Monkey, I really like the way you structure your videos - you take subject matters of all kinds even some really complex ideas and break them down into practical procedures that anyone can follow. I mean that in the best way possible and I wish more people would make tutorials like the way you make them.
    Having said that, I hope you don't mind me dropping a request on a subject matter. With ECS coming up, I've been slowly pushing myself towards higher-performance code.
    But one of the things I think ECS does not fix is - animation/material rendering overhead when you use mechanim/skinned mesh renderers. Even without any code attached to some of my models, I can only have a couple hundred at most before my frames start massively dropping away. Do you think you can explore some of this and share some methods to optimize animation/material rendering?
    I've dug through lots of videos/blogs, while most of them do what they promise to do - they each work only under a very specific set of conditions. They become incompatible if you use shader graphs, multiple materials on a model, incohesive with mechanim (blended animations, multiple layers, state trees) - and so on so forth. If you have any ideas about this, I would really love to know - thanks in advance!

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว +4

      The new DOTS Third Person Shooter should be coming out at the same time as 2019.3 and I believe it contains a fully DOTS based animation system. So looking at how they did that will probably help.
      There's also the first DOTS demo they showed, the thousands of minions fighting on a bridge, I believe they were using skinned meshes and the project is available somewhere but can't remember where.

  • @sumeyyeaslan03
    @sumeyyeaslan03 2 ปีที่แล้ว

    Hello, for example, if we have more than one different object and we drag and drop on only one area, how can we do this? I want to drag and drop more than one object to a certain area so that they do not overlap.

  • @Rook1e0ne
    @Rook1e0ne 4 ปีที่แล้ว

    hey man i know its been a while since the video and i dunno if u still check the comments but i can get the OnDrop() to work . I have the block raycasts = false like u did and while googling after that everybody seems to get it working . do u have a clue what could cause this ? (i also went on and made a canvasGroup for each of the children of the dragable obj and then set the block raycasts = false to those as well and still nothing)