Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Resolved [PHOTON] SendBufferFull when player join the room.

Discussion in 'Multiplayer' started by darceyo, Jan 29, 2024.

  1. darceyo

    darceyo

    Joined:
    Jan 10, 2024
    Posts:
    28
    [Problem solved]

    So i have [-11]SendBufferFull callback from photon when joining the room.
    It happens when i enter the game, add some RPC calls to the buffer, close the game and re-open it.

    Any ideas of how to fix that? How to change the Buffer size?

    Sending less data will not solve it for me, since i need to sync all items on the scene that dropped by each player, there a lot of items actually and each player send Buffered RPC on drop.
     
    Last edited: Feb 1, 2024
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    Using Buffered RPCs is not the right tool for the job. It is as if you insist on using a hammer where you need a screwdriver. It makes things worse.

    Room Properties at least only store the last state of any key/value. This is better, yes.
    You could possibly also assign an ID for any item during creation time of the scene (or with a deterministic approach to spawning them based on a seed) and then only store the changes to any item.

    That said: PUN might be the wrong tool altogether, depending on what you try to achieve. It's not wrong or prototyping for sure.
     
  3. darceyo

    darceyo

    Joined:
    Jan 10, 2024
    Posts:
    28
    Is there way to change the buffer size? It's not matter what huge it can be, since i need to call it only on start, during loading.
    I think that Room Properties is not good option to store dropped items. Since it should work the same as RPC, so there is no difference, only if it's not use the Buffer.

    Just imagine that player drop blocks:
    So we have like [block1.x, block2.x, block3.x...]
    I need to spawn them for a new player that just joined, Buffered RPC is great in this job, but why it have limited buffer?
     
    Last edited: Jan 29, 2024
  4. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    There is no way to change the buffer size in our Public Cloud.
    I can only make suggestions about how to approach solutions. You are using a system with a generic server. This means you don't need anyone to host an instance of Unity to run the game but you have to make do with the resulting limits.
     
  5. darceyo

    darceyo

    Joined:
    Jan 10, 2024
    Posts:
    28
    what the purpose of Buffered RPC then if there limits?
    is that possible to send buffer in few waves to prevent error message?
     
  6. darceyo

    darceyo

    Joined:
    Jan 10, 2024
    Posts:
    28
    Do you think it can be solved using PhotonView on each block and just use PhotonNetwork.Instantiate?
     
    Last edited: Jan 29, 2024
  7. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    Sorry, no. It is just not that scalable and an "instantiate" message per object is adding quite some overhead, which you may want to avoid.
     
  8. darceyo

    darceyo

    Joined:
    Jan 10, 2024
    Posts:
    28
    Just want to let you know that we fixed it.
    We created our own Buffer which it not related to your cloud, so we can store here as many RPC as needed.
     
  9. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    Ah ok. Yes, that can work. Glad you found a solution!
     
  10. akpardeshi136

    akpardeshi136

    Joined:
    Apr 4, 2019
    Posts:
    1
    @darceyo Can you tell me how did you implemented your custom buffer?