Hi all,
How can I get solve the next problem ?
I have two different objects for example “Object A” and “Object B” and I have another gameObject which ones take a Script (calls: GameEngineHandler). So I would like to check when “A” and “B” gameObjects are collided, how can I get this information from another gameObject which keep the script ??
Thank for the help in advance!
Here is a code snipp:
public void OnTriggerEnter(Collider col) {
if (player.GetComponent<Collider>() == colliderbox.GetComponent<Collider>()){
Debug.Log("Player and the box are collided !");
}
}