Okay, so I’m making an arcade style game where you are shooting flying enemies. However, the script responsible for destroying the necessary objects doesn’t appear to be activating. It looks something like this:
#pragma strict
function OnTriggerEnter ()
{
Debug.Log("Destroyed");
Destroy(gameObject);
}
This script is on everything that needs to be destroyed at the moment, including the bullets, the player, and the enemies. I have 2D box colliders on all of these. The ones on the bullets have “Is Trigger” selected. The player and the enemies have two colliders, one without “Is Trigger” and one with “Is Trigger” for each. The Debug.Log has not been triggering at all. I am almost certain that this is something simple that I am overlooking, because I haven’t coded in a while.