Timeline for StartCoroutine inside TriggerOnEnter2D isn't working
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 24, 2015 at 9:14 | comment | added | SanSolo | The function not having parameter is irrelevant. The parameter is completely optional. You need the Collider2D reference if you are going to do something with it. Like destroying the collided object. Not including the parameter won't stop the function from being called. | |
May 25, 2015 at 12:14 | comment | added | Savlon | I knew I saw it somewhere, I posted in it lol. Read it gamedev.stackexchange.com/questions/87452/… | |
May 25, 2015 at 12:11 | comment | added | Savlon | OnTrigger do not need a method parameter to work. I believe your problem is elsewhere. im pretty sure I've seen other questions about calling coroutines from OnTriggerEnter methods but I can't remember if there was a solution. If you place a debug method in the trigger method, do you see it in the console? | |
Feb 25, 2015 at 22:32 | comment | added | lvictorino | Are you sure it's the return needed is about OnTriggerEnter2D? Because the documentation says nothing about that, just asking a void. | |
Feb 25, 2015 at 21:18 | comment | added | Agus | When compiling the " OnTriggerEnter2D " function returns " The method must have a return type " This does not work :( Thanks 4 your help! | |
Feb 24, 2015 at 6:11 | history | edited | lvictorino | CC BY-SA 3.0 |
added 196 characters in body
|
Feb 24, 2015 at 6:07 | comment | added | lvictorino | Sure. As my answer doesn't seem to be clear enough I'll edit it. | |
Feb 24, 2015 at 2:10 | comment | added | Agus | Yes, the Collider2D is in the object and in the player, all set in "IsTrigger", to be safe , use a debug on to indicate when the player colliding with the object, if it detects a collision and changes the first value , but no coroutine starts. | |
Feb 20, 2015 at 6:15 | history | answered | lvictorino | CC BY-SA 3.0 |