IEnumerator Start() { GameObject enemyGo = GameObject.FindGameObjectWithTag("Enemy"); m_enemy = enemyGo.GetComponent <BasicEnemy>(); m_enemyThruInterface = m_enemy; Destroy(enemyGo); yield return(null); if (m_enemy == null) { Debug.Log("enemy is null"); } if (m_enemyThruInterface == null) { Debug.Log("idamagable is null"); } if (m_enemyThruInterface.Equals(null)) { Debug.Log("idamagable equals null"); } }