- Home /
Unity surprisingly skips methods
As in title - when I start game, it skips all of SprawdzaPrawo and SprawdzaLewo. Why? And how fix it?
What do you mean by skipping the methods?
Are they called somewhere? According to your code, you just define them, you never call them.
Answer by Captain_Pineapple · Jul 02, 2018 at 11:11 AM
Hey there,
i'm assuming here that "SprawdzaPrawo" and "SprawdzaLewo" are supposed to be the functions that shall automatically execute as soon as you collide with something.
But these callbackfunctions that unity automatically triggers have to be exactly named. Thus the start function hast to be a void Start()
and so on.
What you are searching for is to combine your 2 functions into one and name it OnCollisionEnter
Then it will be called when your object collides with something.
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to call an external method? 2 Answers
Null Reference Exception: Object Reference, with base class? 1 Answer