// Use this for initialization void Start() { textureList = GameObject.Find("Main Camera").GetComponent<StudentTextureList>(); mineStu = GameObject.Find("battleBackground"); myStudent = GameObject.Find("battleBackground").GetComponent<BattleButtonManage>().CurrentMine; enemyStudent = GameObject.Find("battleBackground").GetComponent<BattleButtonManage>().CurrentEnemy; animationlist = GameObject.Find("Main Camera").GetComponent<AttackAnimationList>(); battlestate = GameObject.Find("battleBackground").GetComponent<BattleButtonManage>(); if (myStudent == null) Debug.Log("myStu is null"); if (myStudent.retSkillList() == null) Debug.Log("mySkillList is null"); }