Question by
turbodroid · Sep 04, 2016 at 12:21 AM ·
unity 5triggernamespace
OnTriggerEnter is not working ?
OnTriggerEnter is not working when i use the following namespace " UnityStandardAssets.Vehicles.Car"
this is my script :
using UnityEngine;
using System.Collections;
using UnityStandardAssets.Vehicles.Car;
using UnityEditor;
public class gallonTRIGGER : MonoBehaviour
{
private fuelSystem fuel;
public GameObject gallonMesh;
void Awake()
{
}
void OnTriggerEnter(Collider takes)
{
fuel.currentFuel = fuel.maxfuel;
Debug.Log("done");
Destroy(gallonMesh);
}
}
Comment