Unity Basics - How to access other scripts

preview_player
Показать описание
Unity Basics - How to access other scripts

In this video I will show you the basics of how to access another script from inside of your script. This is a common question that comes up a lot from beginners and can be hard to understand at first. I hope this explanation breaks down the basics for you to understand the concept.

#unity #unitytutorial #gamedev #indiedev #unity3d
Рекомендации по теме
Комментарии
Автор

I see this question asked on Discord and Forums a lot from beginners, here are some simple ways to get started accessing other scripts and variables! Thanks for watching.

MetalStormGames
Автор

Great tutorial on the basics of accessing other scripts!

Something else that could be good to break down, going on from this example, would be using 'inheritance' scripts. How they can be use for handling stats like health and possibly even the use of function calls that can check values as you change variables to check for states like death.

Quite a bit more complex, but I remember it taking me so long to get that when I was starting out.

BirdmaskStudio
Автор

Thanks! I just faced this problem but remebered it from courses and here is your video)

aleks_gavs
Автор

This is awesome. I hate having to drag everything piece by piece. And all of the tutorials show this same process of drag and drop.

CHEEZEyCHEEZE
Автор

Finally got a solution, thanks. The only thing is, I wanted to save the highscore, therefore it was private in the other script, due this I had to set it public. Are there any ways to leave it private and still get access to it?! 🤔

FaKz
Автор

TY for this video. Ive got a question; is there any way to do this using a prefab

svedzmusik
visit shbcf.ru