How To Interact With Objects [Unity Tutorial]
Вставка
- Опубліковано 1 сер 2024
- In this video we're going to take a look at making a generic and reusable script along with a few separate classes to make any of our objects in-game intractable!
🏡Assets used in this tutorial are the House Interiors and City Street tileset asset packs from Itch by MuchoPixels. find him here:
muchopixels.itch.io/
/ muchopixels
Join me and learn your way through the Unity Game Engine, the C# language and the Visual Studio editor. Remember, if this video was useful then DROP A LIKE! 👍
LEARN MORE ABOUT:
Extension Methods: • Video
2D Character Movement: • Retro RPG Style 2D Cha...
Singletons: • The Beauty of Singleto...
Inheritance: • Using Inheritance In U...
💬 Join the Discord community here:
/ discord
📱 Find us on social media for more Tips and Tricks:
/ comp3interactive
/ comp3interactive
📱 Play our games for FREE here on Google Play:
bit.ly/2TisAQo
☕ Did I help you out? Feeling generous? Consider buying me a coffee/beer🍺😍: www.buymeacoffee.com/4dpS3yL
-- CREDITS --
Intro music courtesy of AudioKorruptBeats, find him here:
/ audiokorruptbeats
www.beatstars.com/audiokorrup... #UnityTutorial #Unity3D #Comp3interactive #GameDev
Hi! Thank you for the super useful information! I am not into coding that much but I could get over my problem with your clear explanation.
I appreciate this tutorial because you explained every line of code you wrote and taught me so much in only 20 mins.
I feel that's where a lot of tutorials on UA-cam fall short, they tell you what to do, but not why you're doing it
Thanks bro been looking for this ❤
OMG it's Works like wonder!!!!, Thankyou so much!
Buen video, Good video :)
Hi Comp3 , this is a fantastic video and thankyou for making this. I am getting a slight issue if anyone can assist. When I go to the interactable object, the icon (mouse over icon) only appears on top of one of the objects, then when I move to the second object, the interactable icon will appear above the first object only and not the next one. Hope that makes sense.
thank you for the tutorial, I appreciate it but.... i have some problem with my script, can you put the openable script to Drive or something so i can download it ?
Hello. I'm fairly new to coding. I'm just wondering why you would use abstract class inheritance over an interface? I know that you can only inherit one class where as you can inherit multiple interfaces. Great video by the way, very helpful :)
Is it possible to use animations instead of SpriteRenderer with this kind of script?
u r awesome-town my man
Hello! Good tutorial in terms of pacing and explanations! I do have an issue however...
I'm getting two errors in the Openable script!
First one is "no suitable method found to override" and refers to public override void Interactable()
Second one is "does not implement inherited abstract member 'Interactable.Interact()'" and refers to public class Openable : Interactable
Now this could totally just be something about the version of Unity I'm using, or whatever, but if anybody knows a solution to this I would greatly appreciate if you'd reply! 💖
as an american i feel attacked, leave my cans alone! lol loved the video
I don't understand what is the purpose of the existence of Reset() method at 8:20 .
It is not referenced and put into use in any other line n is not a built-in method.
I keep getting an error in my "Openable" Script??? It keeps saying that it can't find the script. I thought maybe I mistyped something, or that I missed a semi-colon, but no. There's nothing wrong? I've re-written the script five times and it still isn't working.
I fixed it nvm
14:06 (pls ignore)
You cannot pick up or grab objects with this script. So... not, this is not "extremely" reusable.
Of course you could also trigger to pickup an Item like this. The raycasting-method just serves as a trigger for other functions. Just because there is no "pickup" method in this video, it doesn't mean, that the raycasting approach doesn't suit the purpose...