Horje
call function from another script unity Code Example
how to reference function in unity
public GameObject myObject; //make ref. in inspector window

myObject.GetComponent<MyScript>().MyFunction();
call function from another script unity
void Start()
{
    ClickToMove = FindObjectOfType<ClickToMoveScript>();
    ClickToMove.PlayWoodCuttingAnim();  
}  
call function from another script unity
MyScript2 x = gameObject.AddComponent(typeof(MyScript2)) as MyScript2;
x.MyFunctionFromScript2();

OR EVEN BETTER : 

public class myClassNameToInclude: MonoBehaviour { myfunction1(int x) Debug.Log(x); }
public class myClassName : myClassNameToInclude { myfunction1(2); } // MonoBehaviour included with myClassNameToInclude 
public class myClassName2 : myClassName {...} // MonoBehaviour AND myClassNameToInclude included with myClassName 
unity call function from another script
public otherScript other;

   void Update()
   {
     other.funtion();
   }
how to call a function that other scripts can access in unity
void Start()
{
  method.Add <function>().getMethodType("UnderMoved") = false;
}




Csharp

Related
how to remove space between string in c# Code Example how to remove space between string in c# Code Example
delete all dir content c# Code Example delete all dir content c# Code Example
list of string to string c# Code Example list of string to string c# Code Example
if in dictionary c# Code Example if in dictionary c# Code Example
how to split concat string c# Code Example how to split concat string c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12