- Home /
Question by
unity_07marius94 · Apr 30, 2021 at 08:34 PM ·
mesh collider
Why are mesh colliders not working when building the game
I have an object, and inside the object are several 3d houses. In order for me to not pass through the houses I added the following script to the object :
https://paste.myst.rs/31cybhqn
If I hit the play button, the code runs just fine, the mesh colliders are added and I cant pass through the buildings. But if I Build and play the game, I pass through the buildings. Any advice? thanks
Comment
Answer by unity_07marius94 · May 01, 2021 at 07:51 AM
So.. I manage to find a solution myself. I opened the origin of the prefab houses since I imported them and I checked Read/Write Enabled in the model in the inspector tab.