Interacting with GameObjects within your scenes is a core tenet to game development within the Unity Engine. I wanted to engineer a system that would show off Unity Events, while also being generic enough to slap on to any of your objects and wire up quickly.
Admittedly there are many ways to improve upon the basics I show in the video (as well as lots of error checking and handling!), but I wanted to demonstrate the concept in a concise and timely manner.
I’m confident this can be a useful launching point, and I hope you’ll find it useful!
LIKE the video if this helped you out at all, it helps the channel’s visibility and lets me know what I got right!
COMMENT if you have any suggestions or critiques! (or just want to say hi)
SUBSCRIBE for more tutorials and game development content!
Thanks for watching!!
MORE UNITY TUTORIALS (PLAYLIST):
SOUND EFFECT TUTORIAL MENTIONED:
NEW to game development? Start with my 2D Movement Tutorial:
~~~~~~~~~~~
ASSET LIST
~~~~~~~~~~~
Ninja Character:
~~~~~~~~~~~
Nguồn: https://technewsgator.com
Xem thêm bài viết khác: https://technewsgator.com/game/
This is a very good tutorial, but I am encountering a problem. For my interactAction, I have a change scene script. However, whenever I try to use it, I get the error “ArgumentException; object of type ‘UnityEnginge.object’ cannot be converted to ‘UnityEnginge.Collider2D’. I have ‘Collider2D’ in the parenthesis of my interactAction. Any advice would be really appreciated.
can this work in 3D?
This is awesome thank you!!
How do you toggle the sprite between open and closed? I created a single sprite animation in the animator and it kind of works, but it doesnt toggle with the checkbox like yours does.
I am so happy for finding an awsome channal 😍
whats the song before the end of this tutorials when you playing the game ?
so I am trying to make it run an animation but it is looping at the very beginning how would I fix this?
Cool straight to the point and very fast, fast enough that I couldn't get the part where you've put the interactive sprite above the payer's head. I keep getting errors and I know I'm missing something in both "Interactable" and "PlayerManager"' scripts on that part. Everything went well except this part! Can you help and explain it in a comment lol ? by the way it's a 3D game and I'm using Sphere collider (but nevermind, as I said the collision part is working fine) ! Thanks a lot 🙂
Hey when I saved the first bit of script you did it says it doesnt recognize "UnityEvent" I'm sure it's something on my end but any help?
Dude you just saved my ass, keep on going you're great, YT need more tutorials like yours
Thank you so much! I haven't used Unity Events much before but they're perfect for things like this. Well explained too X)
sweet
The video was very helpful, thank you.
Hey BMo sweet vid – Know any open source 3d sprites / libraries to mess around with some simple simulations? I'd love to see that
Awesome vid!! Quick question tho – what happens if there's 2 intractable circles that overlap? Is there any way to say that one should be interacted with over the other?