Here is a simple scene where you can see the problem.
Here i have objects i want attach my mesh collider on through script.
In hierarchy i have my trapColliders, those are objects where the script for creating colliders is attached.
when you click on the object you will see inspector properties, and there are script attributes where you can attach your mesh collider
But when i attach my mesh collider through script, it does not appear in the game(i also have collision ingame drawings so you can see collisions)
Here is the script that creates a collisions: https://playcanvas.com/editor/code/753870?tabs=40934283
A quick point: when i try to add manually mesh collider it works,but i want it to be added through script(that means there is no problem with model of collider)