Hello,
How can I call or execute a function from a Script in other script?..any help about it? ![]()
Hello,
How can I call or execute a function from a Script in other script?..any help about it? ![]()
There are two ways.
First way is if the script is attached to a game object. If itâs attached to the same gameobjectâŠ
var myGameImageLib = GetComponent (âGameImage_Libâ);
myGameImageLib is the variable youâll use to use the file called GameImage_Lib.js
To call a function from GameImage_Lib
myGameImageLib.CreateInfluenceLine();
The second way is if the file isnât attache to anything (does not carry any information). Place the file you want to use in StandardAssets>Scripts
To use them you just use filename.functionname