Call A Method Before Local Player Disconnected

Options
Hello everyone,

I have a method which works pretty well when calling somewhere else or calling by ui buttons.

I'm having this issue:
I need to call this method just before when local player disconnected.

If i use "OnPhotonPlayerDisconnected()" it doesn't work properly because it is calling from remote player, not locally.

I also tested "OnLeftRoom()" method but it doesn't even calling.

My method here:
    public void ReleaseSlot()
    {
        Slots[slotIndex] = true;
        Hashtable updateScore3 = new Hashtable();
        updateScore3.Add("teamslot" + slotIndex.ToString(), false);
        PhotonNetwork.room.SetCustomProperties(updateScore3, null, false);
        alreadyJoined = false;
    }

Comments