I am instantiating entiy coverted from gameobjects.
The physics works but OnCollision event is not raised. This can be raised if I add a PhysicShape script and I enable it under Advanced section.
Since I want to keep GameObject and be able to switch from “standard” to ECS esily, I am wondering how can I enable raisesCollision from script. What data should I set?
Thanks
This gets converted into the material properties on the PhysicsCollider component. I would recommend you convert two copies of your collider, one with events enabled and one without, and then at run-time you can swap the value of the PhysicsCollider component between the two states as needed.