So I’m trying to make an infinite runner and have code to destroy the terrain once it reaches a certain point, but I want to be able to send a signal to another script that has code for bringing in another block of terrain at the end, but I don’t know how to get the original script to trigger that part on the other one.
can add the 2nd script as a public reference, and assign it in inspector:
// in script1
public YourScript2 script2;
then can call public method from that 2nd script:
script2.DoSomething();
// in script 2
public void DoSomething()
{
Debug.Log("DoSomething was called");
}