Hi guys. Please I need some help here. I have a countdown timer working perfectly. Is linked to a canvas text. I would like to stop it when my player touches a trigger. I am new at unity and I have been trying to sort it out by using GetComponent, but nothing happens. Please help!
TIMER
TRIGGER
Instead of:
GetComponent<temporizador>();
Use:
gameObject.GetComponent<temporizador>();
And to stop timer:
gameObject.GetComponent<temporizador>().myCooltimerEstaActivo = false;
Many thanks, however I need to display the time when the player hit the trigger to win the game that is why I need to print that time on the trigger script.