private void DisplayQuestionsDialog() { GameObject _ui = GameObject.FindGameObjectWithTag(GlobalVars.TAG_UI); GameObject dialog = Instantiate(prefab, prefab.transform.position, Quaternion.identity, _ui.transform); // show dialog QuestionDialog question = dialog.GetComponent <QuestionDialog>(); question.getQuestion(); Destroy(gameObject, 1.35F); }