Hello, I already created a few script with trigger event but this one so simple it seems not working.
I created a rigid body and a box collider for both of them but it doesn’t trigger the debug log
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PacketsEnemy : MonoBehaviour
{
void start()
{
GameObject[] server = GameObject.FindGameObjectsWithTag("Server");
}
void OnTriggerEnter2D(Collider2D server)
{
Debug.Log("Pacchetto");
}
}
screenshot Screenshot by Lightshot