private void SetHumanAtt() { for (int i = 0; i < ListAimPos.Count; i++) { if (ListAimPos[i] != null) { Destroy(ListAimPos[i].gameObject); } } ListAimPos = new List <AimPos>(); HumanAimPoses.Clear(); if (attbutes.humanAtt.aimList != null) { for (int i = 0; i < attbutes.humanAtt.aimList.Count; i++) { Vector3 pos = attbutes.humanAtt.aimList[i]; AimPos aimPos = Instantiate(AimPos, attGameObjects[4].transform).GetComponent <AimPos>(); aimPos.Value = pos; aimPos.Init(pos); ListAimPos.Add(aimPos); HumanAimPoses.Add(pos); } } HumanOther.SetAsLastSibling(); Toggle_isHumanRepeat.isOn = attbutes.humanAtt.isRepeat; inputField_humanSpeed.text = attbutes.humanAtt.speed.ToString(); }