Unity - Call a method/function from another script

preview_player
Показать описание
This video shows how to call a method or function from another script in Unity using the game object tag name.
Рекомендации по теме
Комментарии
Автор

After lots of pain, this tutorial made it seem so easy! Super concise, addressing the specific issue clearly and very effectively. Thanks a bunch!

potatobrother
Автор

Lost all sight for about 30 mins considering its the middle of the night but still a very straight forward and to the point tutorial, thanks

TrueLazyboy
Автор

THANK YOU! This is such a simple thing but I was yet to find a simple tutorial as I am very new to unity, no other tutorial has explained it this well. Thank you so much!

oscxrl
Автор

I get this error message when calling the function:
NullReferenceException: Object reference not set to an instance of an object

There are no red lines in vs and the game runs without problem until I try to call the function.

qwe-dexd
Автор

when you naming everything needed, do you know it's really hard to distinguish which is calling which???

xisu
Автор

NullReferenceException: Object reference not set to an instance of an object,
why am I getting this error ?

majaharkazi
Автор

this video singlehandedly saved me hours on GMTK game jam! thank you!

sampreetsingh
Автор

You are the goat. Such an easy straightforward video

goldchn
Автор

Thanks, absolutely great video you got right to the point, other videos a saw stuffed around for ages and i loved how you actually had name for things that werent just letter. this helped so much thanks a lot

toastgames
Автор

One of the best tutorials I've seen! Thanks a lot!

FitKlik
Автор

2 years ago and it helped me figure out a solution for an object i instantiate on a respawn point, but i can't assign it a respawn object because it is a prefab. I always wanted to know if I could call scripts from other scripts without unity events. TY

xVemist
Автор

Thank you so much! This tutorial helped me a lot and now I added a sprint mechanics to my game! Easy and quick tutorial! :D

fatpenguin_
Автор

Thank you man! I search that thing like several weeks, and your video helped me

tamaskiri
Автор

This is one of the best tutorials out here! Thanks sooo much

Samatizer
Автор

We need more people like him, legend.

NayyarAbbas-shvw
Автор

what if i want to call a funtion from 2 different gameobjects with the same script

prklp
Автор

thank you man i was just thinking how i can call it from prefab

thank you very helpful <3

son_y
Автор

You made so simple, God Bless you Bro🙏

sneezerplays
Автор

As nice as this is, I am using tags for something else. How can you do this without the tags?

WillToWinvlog
Автор

This is very confusing with every part being called "needed" you colud have atleast named them needed1, needed2, ... to make it more obvious what part you mean

Kapfz