Jayanam: Unity Tutorial : Call C# Script from GameObject

Unity Tutorial : Call C# Script from GameObject
In this Unity 2018 tutorial I show how to call a method of a C# script (Monobehavior) from anoather game object’s script.

As an example I use the game object that we created with Blender 2.8 that has a blue material assigned.

I will add a script to this object with a method called ChangeColor that we call from a second script that is attached to another game object.

I call this when the other game object (a sphere) collides with the floor.

See my social profiles here
G+: https://plus.google.com/+JayAnAm
Twitter: https://twitter.com/jayanamgames
Facebook: https://www.facebook.com/jayanamgames
Patreon: https://www.patreon.com/jayanam

Production Music courtesy of Epidemic Sound: http://www.epidemicsound.com

View on YouTube

Join the Discussion

Share your thoughts, ask a question, or tell us what you learned. Your first comment is reviewed before it appears. Once approved, future comments using the same name and email can appear directly, subject to spam checks.

Leave a Reply

Your email address will not be published. Required fields are marked *

Fix the Blender logo

Drag the loose piece into the missing part. A close fit is enough.

Loading verification…

Keyboard: arrows to move, Shift for fine adjustment, Enter to check. Verification only; movement is not stored. Logo: Blender.