Problem detecting colliders with triggers

Hello
I’m having problems detecting colliders inside a BoxCollider that is a trigger.
What i have is a GameObject with a Rigidbody and a BoxCollider attached to it. The RigidBody has isKinematic set to true and the BoxCollider has the isTrigger set to true and i’m creading those dynamically on Start().

        Collider collider = gameObject.collider ? gameObject.collider : gameObject.AddComponent<BoxCollider>();
        collider.isTrigger = true;
        ((BoxCollider)collider).center = m_simulationDomain.center;
        ((BoxCollider)collider).size = new Vector3(m_simulationDomain.width, m_simulationDomain.height, 1);
        Rigidbody rigidBody = gameObject.rigidbody ? gameObject.rigidbody : gameObject.AddComponent<Rigidbody>();
        rigidbody.isKinematic = true;
        rigidbody.useGravity = false;

I have a script on the GameObject that catches “OnTriggerEnter” and prints the collider that triggered it.

My problem is that if i create any object with a BoxCollider inside the base Gameobject collider i get no trigger message. If i change the isKinematic to false it will detect the colliders already inside but any other collider that will be creaded or enter it afterwards will not be detected.
I have also tried with Collisions by setting the isTrigger to false and catch “OnCollisionEnter” still the same problem.
Am i missing something here?

I have attached a sample project that shows this behavior. 1423068–75062–$TriggerTest.zip (17.2 KB)

Thanks
Gilberto

Did you try adding rigidbodies? That fixed the same problem for me.

I don’t want to add RigidBodies to the other objects just colliders because i’m going to have a huge number and it will be a performance issue.

By reading Unity - Manual: Box collider component reference at the bottom there is a chart and according to it the trigger detection should occur in all scenarios.
My scenario is “Kinematic Rigidbody Trigger Collider” and i’m trying to detect “Static Collider”. Only “Rigidbody Collider” and “Kinematic Rigidbody Collider” seem to work.
when in the editor i change any attribute of the rigidbody while running it detects all the colliders correctly making me wonder if the collider might be sleeping or something like that. I tried calling WakeUp() on it but nothing seems to help.
Is anyone else experiencing this?

Thanks
Gilberto

By reading this thread → Keep Rigidbody awake - Questions & Answers - Unity Discussions
I found that calling
transform.position = transform.position;
on the Update() will do the trick.