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!
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
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.
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
Did you attach it to an empty object? It's basically telling you that the script has no object to reference in order to get the functions from the script
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
not sure what version your using but this works for me in 2021.3.6f1 public GameObject ScoobyDoo -> link your desired GameObject with the new variable ScoobyDoo in the unity inspector public void MyFunctionThatIsGoingToActivateADifferentFunction( ) { ScoobyDoo . GetComponent ( ) . NameOfFunctionThatNeedsToBeActivatedGoesHere ( ) ; } way more simple and you dont need tags or anything
After lots of pain, this tutorial made it seem so easy! Super concise, addressing the specific issue clearly and very effectively. Thanks a bunch!
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!
Glad it helped!
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
Thank a lot. That is wonderful to hear.
this video singlehandedly saved me hours on GMTK game jam! thank you!
I am glad it helped :)
You are the goat. Such an easy straightforward video
Thank you man! I search that thing like several weeks, and your video helped me
Glad I could help :)
One of the best tutorials I've seen! Thanks a lot!
This is one of the best tutorials out here! Thanks sooo much
Glad it was helpful!
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
We need more people like him, legend.
Thanks :)
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.
You may have forgotten the tag or badly written it
@@cookie856 If i remember correctly i was trying to find a clone that hadn't spawned yet. Thanks for the help though 😀
I also have this problem
thank you man i was just thinking how i can call it from prefab
thank you very helpful
My pleasure, thanks for your support :)
You made so simple, God Bless you Bro🙏
Glad it helped :)
Instance of Object error
when you naming everything needed, do you know it's really hard to distinguish which is calling which???
Fair point :)
Finally!!! Simple and working! Thanx!
Glad it helped :)
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
NullReferenceException: Object reference not set to an instance of an object ,
why am I getting this error ?
Did you attach it to an empty object? It's basically telling you that the script has no object to reference in order to get the functions from the script
finaly a good tutorailn
This is the best
Thank u its help me a lot
Glad to hear that :)
what if i want to call a funtion from 2 different gameobjects with the same script
Gracias, me funciono muy bien!!!!
thankyou bro
Happy to help :)
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
As nice as this is, I am using tags for something else. How can you do this without the tags?
not sure what version your using but this works for me in 2021.3.6f1
public GameObject ScoobyDoo -> link your desired GameObject with the new variable ScoobyDoo in the unity inspector
public void MyFunctionThatIsGoingToActivateADifferentFunction( )
{
ScoobyDoo . GetComponent ( ) . NameOfFunctionThatNeedsToBeActivatedGoesHere ( ) ;
}
way more simple and you dont need tags or anything
Thanks, that would work too.
nope, does not work
The only method that works is the one Da Lab shows in this video
Linking a GameObject doesn't work, just tested
@@romeprince11 worked for me, thats why i wrote it here
Thanks for the feedback @romeprice11. Let me try @scarshe5978 suggestion and will let you know how it goes.