private void Awake() { if (current != null) { Debug.LogWarning("Mais de uma instancia de ManagerDialogo!!"); return; } current = this; }
void Awake() { // First we check if there are any other instances conflicting if (instance != null && instance != this) { // If that is the case, we destroy other instances Destroy(gameObject); } instance = this; GameObject UIDialogoGO = (GameObject)Instantiate(Resources.Load("Dialogo/UIDialogoPrefab")); //Cargamos el prefab de la ventana de dialogo //Establecemos el estado inicial SetState(State.Ninguno); dialogosEnCola = 0; }
// Start is called before the first frame update void Start() { gazeAware = GetComponent <GazeAware>(); referencia = GameObject.Find("ManagerDialogo").GetComponent <ManagerDialogo>(); }