trigger wont work on build

My trigger cube turns off all info cards and then turns one back on, works fine when I play from editor, fails to work (throws no bug, just doesn’t work) in my build- any ideas why?

the script is as follows;

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class triggerCardFromProduct: MonoBehaviour{
public GameObject theInfoCard;

private GameObject[] turnOffCards;

	void OnTriggerEnter(Collider other){
		turnOffCards = GameObject.FindGameObjectsWithTag ("infoCard");

		for (int i=0;i<turnOffCards.Length;i++)
  •   }*
  • if (other.CompareTag (“MainCamera”))*

  •   {*
  •   	theInfoCard.SetActive (true);*
  •   }*
  • }*
    many thanks!

You may need to have a rigid body component attached to the game object in order to trigger an event. Do you have a rigidbody component on the object doing the triggering?

Same for me, it doesn’t work when I build it, but it work in editor

I’ve had this same issue, it worked in editor, worked in release build, but the trigger collider wouldn’t work in development build.