Hi there I am using Unity 5.5.1f1, receiving the error " The type or namespace name ‘Projectile’ could not be found (are you missing a using directive or an assembly reference?" and the console is saying “Projectile' is a
type’ but a `variable’ was expected”. The Projectile script is on the lasers, the ships have their rigidbody2d and poly colliders.
Here is the code:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyBehaviour : MonoBehaviour {
void OnTriggerEnter2D(Collider2D collider)
{
Projectile missile = collider.gameObject.GetComponent<Projectile>();
if (missile) {Debug.Log("Hit by projectile"); }
Any help greatly appreciated