OnTriggerEnter
void OnTriggerEnter(Collider collider);
This thing doesn't work, it says must declare a body because it's not marked abstract, extern or partial
That should work? Are you calling it as you pasted it with the semicolon? That's the only issue I can see that it should be followed by brackets, because it is simply defined and called when things enter it, not anytime else. That said, it's always possible you just absent-$$anonymous$$dedly put it there, in which case what I suggested isn't exactly a fix. Either way, you'd be better off getting a solid answer by maybe including some more relevant code surrounding it to give a better understanding for people trying to answer.
Answer by Statement · Oct 09, 2015 at 11:51 PM
void OnTriggerEnter(Collider collider);
You must declare a body
void OnTriggerEnter(Collider collider)
{
// This is the body.
}
Your answer
Follow this Question
Related Questions
What do I need to do to develop an FPS survival game? 1 Answer
My gameobject disappears when I transform it 1 Answer
LookRotation moves GameObject 2 Answers
Scaling a text to fill 50% of screen width and 50% of height, no matter whats inside C# 0 Answers
If statement not getting called after Lerping a Scale 1 Answer