// Use this for initialization void Start() { partySystem = GameObject.Find("Scripts").GetComponent <PartySystem>(); memberFrame = new GameObject[4]; memberFrame[0] = firstMember; memberFrame[1] = secondMember; memberFrame[2] = thirdMember; memberFrame[3] = fourthMember; removeButton.SetActive(true); // 脱退ボタンのメソッド登録 removeButton.GetComponent <UnityEngine.UI.Button>().onClick.AddListener(() => partySystem.RemoveMemberInParty(PhotonNetwork.player.ID)); removeButton.SetActive(false); }
// Use this for initialization void Start() { partySystem = GameObject.Find("Scripts").GetComponent<PartySystem>(); memberFrame = new GameObject[4]; memberFrame[0] = firstMember; memberFrame[1] = secondMember; memberFrame[2] = thirdMember; memberFrame[3] = fourthMember; removeButton.SetActive(true); // 脱退ボタンのメソッド登録 removeButton.GetComponent<UnityEngine.UI.Button>().onClick.AddListener(() => partySystem.RemoveMemberInParty(PhotonNetwork.player.ID)); removeButton.SetActive(false); }