hey guys
(Firstly I have watched the Unity Guides I am just stuck)
I am trying to create a trigger which will enable a script on a gameobject when the trigger and a unit collide
using UnityEngine;
using System.Collections;
public class EnableComp : MonoBehaviour
{
public GameObject mySpot;
void Start()
{
mySpot = GetComponent<BUILDPLACE> ();
}
void OnTriggerEnter(Collider co)
{
mySpot.enabled = !mySpot.enabled;
}
}
Am I using the wrong script cause it just comes up that
‘’ Assets/Scripts/EnableComp.cs(18,32): error CS1061: Type UnityEngine.GameObject' does not contain a definition for
enabled’ and no extension method enabled' of type
UnityEngine.GameObject’ could be found (are you missing a using directive or an assembly reference?) ‘’
THANNNKKSSSSSS