hello I have a scene that in case of collision between two specific objects, something happens (like changing an object color). in unity editor when I run the game it works but I don't have any idea that why this function (which is oncollisionenter) doesn't work and therefore there is no color change when I make a standalone build or web build does anyone have any idea? thanks
A standalone build usually has much higher framerates, especially for scenes that don't stress the GPU too much. This might cause problems in the context of processing Update() events (for example, if you don't scale object transformations in Update() with Time.deltaTime, they will behave differently in editor and standalone build).
Without knowing your code details, one possible scenario that could create the problem you describe is, that your object is much faster in the standalone build, and therefore the physics engine doesn't recognize the collision, so that the objects pass thourgh each other without generating an event. This script might help: DontGoThroughThings