I look at the documentation but I still couldn’t find out how to call a function from another script when the ailerp reaches its destination.
When the target is reached I can use Debug.log(“anything in here”) to see if it is called and it works fine, but I need to call some function from another script.
More details:
There are more function in the Spawner.cs script that I have made. For example there is a function called Identic(). It is set to public void and I tried to call it this way:
GameObject.Find("Main Camera").GetComponent<Spawner>.Identic();
But it doesn’t find my Spawner.cs script.
Can you please help me do it?