How to call a function in another gameObject's script?

Опубликовано: 10 Сентябрь 2023
на канале: Raycastly
3,835
61

Let's learn about calling function from other scripts in C#. Today we learn how to do it in a few different ways by using a reference to the script, or by dynamically getting a reference to the game object that has this script by using either FindWithTag, Find or FindObjectOfType...

Reference some code from the video:
https://pastebin.com/zcBBHCGC

Free 2D Platformer Asset Pack:
https://opengameart.org/content/2d-fo...

Free 3D Platformer Asset Pack: