// Use this for initialization void Start() { //壁管理クラス取得 wallController = GameObject.Find("Walls").GetComponent <WallController>(); //リジッドボディ取得 rigid = GetComponent <Rigidbody>(); //壁管理クラスに自身を保存 wallController.CmdAddBombs(this.gameObject, wallType); }