- Home /
the standalone and web build don't run the same as Unity Editos runtime
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
Answer by Wolfram · Sep 27, 2010 at 10:55 AM
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
sorryI tried it but didn't help. this problem also happens when I make a web build.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Cannot build standalone version with my custom DLL 0 Answers
A truly stand-alone .exe? 3 Answers