Need help ignoring collision

Earlier today, I asked for help regarding how to avoid collision between two instantiated gameobjects.

With my limited understanding on programming, perhaps a question on the general use of it was a bit over my head.

Instead, please help me by looking at my code, poor as it may be, and help me with my problem.

I need to make Missile and Enemy ignore collision with each other.

using UnityEngine;

using System.Collections;

public class EnemyBehaviour : MonoBehaviour {

public GameObject Missile;
public GameObject Player;
public float enemySpeed;
private int health;
private float time;
private int shotFired;
private float shotTimer;

void OnCollisionEnter(Collision target)
{
	if(target.transform.name == "Bullet(Clone)")
	{
		health--;
	}
}

// Use this for initialization
void Start () {
health = 3;
	time = Time.deltaTime;
	shotFired = 0;
}

// Update is called once per frame
void Update () {
	
	if(PlayerBehaviour.playerHeight - transform.position.y >=0.3)
	{
	transform.Translate(-15f * time,10f * time,0);
	}
	else if(PlayerBehaviour.playerHeight - transform.position.y <=-0.3)
	{
	transform.Translate(-15f * time,-10f * time,0);
	}
	else
	{
	transform.Translate(-15f * time,0,0);
	}
	
	shotTimer += 1 * Time.deltaTime;
	
	if(shotTimer >= 0.4 && shotFired == 0)
	{
		
		shoot();
		
	}
	
	if(transform.position.x < -40)
	{
		Destroy(gameObject);
	}
	
	if(health<=0)
	{
		Destroy (gameObject);
	}

}

void shoot()
{

	if(shotFired == 0)
	{
	
	Instantiate(Missile, new Vector3(transform.position.x+3,transform.position.y,transform.position.z),Quaternion.identity);

		
	shotFired = 1;	
	}
}

}

That is for the Enemy

using UnityEngine;

using System.Collections;

public class MissileBehaviour : MonoBehaviour {

private float heightSpeed;
private int directionSet;
private float fireTime;


void OnCollisionEnter(Collision other)
{
	if(other.transform.name == "Ship")
	{
	Application.LoadLevel("Menu");
	}
}

// Use this for initialization
void Start () {
	
	directionSet = 0;
	
}

// Update is called once per frame
void Update () {
fireTime += 1 * Time.deltaTime;
	
if(PlayerBehaviour.playerHeight != 0)
	{
	
	if(directionSet == 0)
	{
		
		heightSpeed = -((PlayerBehaviour.playerHeight - transform.position.y)/(PlayerBehaviour.playerX - transform.position.x-2));
		directionSet = 1;
		
	}
	
	if(fireTime >= 1.0)
		{
			transform.Translate (-100f*Time.deltaTime,heightSpeed*100*Time.deltaTime,0);
		}
		
	}
	
}

}

That is for the missile

Unity’s physics engine allows you to set a layer for each GameObject. It’s also possible to set flags to control which layers will collide with each other. You can read more about this in the Unity manual. If you’re spawning with prefabs, you can set the prefab’s layer using the inspector. If it’s easier in your case, you could also set a bullet’s layer right after spawning it, from script.

If you only need to ignore collision between two specific colliders – say, a bullet and the character who shot it – you can call Physics.IgnoreCollision() to ignore collisions between any two colliders. For this method, you’ll have to do it in script after creating the bullet.

Maybe this is still more general than you’re looking for. Is there some specific part of this process that’s giving you trouble?