I have two game objects. Each of them has script with some parameters, which could be different or same. If they collide each other, those parameters has to be changed (depending on those parameters btw). The code, which doing it, is in OnCollisionEnter().
My trouble is that OnCollisionEnter() fires twice - on first object and on second, so it changes those parameters twice in one collision. How to fix it?
You could also alter your plan and just let one of the objects (the “Master”) handle the updates for both objects, referencing the collider from the Master object.