//装備する public void OnEquipButton(int weaponNo) { string weaponName = Common.Weapon.GetWeaponName(weaponNo, true); if (weaponName == "") { return; } Transform partsTran = myPlayerTran.FindChild(Common.Func.GetPartsStructure(customPartsNo)); GameObject weapon = (GameObject)Resources.Load(Common.Func.GetResourceWeapon(weaponName)); PlayerSetting playerSetting = myPlayerTran.gameObject.GetComponent <PlayerSetting>(); playerSetting.EquipWeapon(partsTran, weapon); if (!playerSetting.isNpc) { //装備情報保存 UserManager.userEquipment[partsTran.name] = weaponNo; PlayerPrefsUtility.SaveDict <string, int>(Common.PP.USER_EQUIP, UserManager.userEquipment); } SetEquipWeaponName(Common.CO.partsNameArray[customPartsNo], weaponName); weaponListPanel.SetActive(false); }