using UnityEngine; // Attach this script to an object with a 2D collider. This will trigger a broadcast when something collides with it. public class MessagingClientBroadcast : MonoBehaviour { void OnCollisionEnter2D(Collision2D col) { MessagingManager.Instance.Broadcast(); } void OnTriggerEnter2D(Collider2D col) { MessagingManager.Instance.Broadcast(); } }