Hello everyone,
When i use OnTriggerExit func Unity3d is crash, anyone know what is the problem? There just two object without meshrender component (invisible) with rigidbody and boxcolliders. Here is a script of the one of them:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Sensor : MonoBehaviour {
StandPlatform platform;
void Start () {
platform = transform.parent.gameObject.GetComponent(); ;
}
void OnTriggerEnter()
{
platform.sensorActive();
Debug.Log(“Sensor Active”);
}
void OnTriggerExit()
{
Debug.Log(“Sensor Inactive”);
//platform.sensorInactive();
}
}
onTriggerEnter work correctly, but when onTriggerExit calls untiy Crash, even the func is empty (all commented). WTF?