- Home /
 
               Question by 
               RazielSilver · Jan 11, 2014 at 08:15 AM · 
                component  
              
 
              DestroyByContact script component check mark disappearing
I'm going through my first game build tutorial, Space Shooter and I'm at the point where we do the initial setup for the DestroyByContact script and after I create it and then save it, the check next to the script name in the component for "Asteroid" disappears and the script doesn't work right. All I can do is shoot and the noting happens to the Asteroid upon collision.
Script:
public class DestroyByContact : MonoBehaviour
{
 void OnTriggerEnter(Collider other) 
 {
     if (other.tag == "Boundary")
     {
         return;
     }
     Destroy(other.gameObject);
     Destroy(gameObject);
 }
}
and when I save this is what I get in the component for Asteroid:
               Comment
              
 
               
              Now the script is working, but now the check box for the scripts in the component section of Asteroid and Boundary are gone.
I'm going to continue on in the tutorial so long as everything works, but if anyone knows what's going on and how to fix it I sure would appreciate any assistance.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                
