I've been developing an academic application for emotion recognition using Affectiva's affdex SDK for Unity. But when I use affectiva CameraInput object and want to load a level, my game crashs on android.
Here is my code:
private void finishGame()
{
var cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>().GetComponent<CameraInput>();
Destroy(cam);
var det = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>().GetComponent<CameraInput>().GetComponent<Detector>();
Destroy(det);
StartCoroutine("LoadMyLevel");
}
IEnumerator LoadMyLevel()
{
yield return null;
Application.LoadLevelAsync("mainMenuScen");
}
this problem asked before here, but doesn't really help me.