Tie them together

I was wondering this for a while now. Is there a way to tie scripts together? Like if I called a function in script 1 and called again in script 2, they would both run off script 1’s original function?

Well you could just simply reference back to your other script…

–MyScriptClassOne.cs–

//Class stuff..
...
public void someMethod()
{
  //Do stuff
}

–MyScriptClassTwo.cs–

//Class stuff...
...
public void someMethod()
{
MyScriptClassOne temp = GetComponent<MyScriptClassOne>();
temp.someMethod();
}

I’m sure you could also do something like a sendmessage but I haven’t messed around with that too much since its not really known to me. But heres the reference.