Hello,
I’ve already check the unity manual and found the execution order that I need (FixedUpdate > OnTrigger/Collision > … >Update).
But I still have 2 questions.
FixedUpdate and OnTrigger/OnCollision are parts of physics engine.
If I write on console a “fixedupdate” message at the beginning of FixedUpdate()
and a “stayintrigger” at the beginning of a OnTriggerStay2D()
the console reports
fixedupdate
stayintrigger
stayintrigger
fixedupdate
stayintrigger
stayintrigger
…
there is 2 collisions messages for 1 fixedUpdate.
Is it normal ? Is it always the same ? I thought (read on manual) that FixedUpdate and collisions worked one after the other.
Other question … If I call a function from a collision, do I have to wait for return before FixedUpdate() start again ?
Thx for your help ![]()
I made traces, and it seems that functions need to returns before the rest of the code continues. I thought that unity parallelized some tasks, but it doesn't.
– LCe