how to clear the cache / instantiation history of prefabs in the room.

Options
in my project the following happens.
the players do not enter the room simultaneously, and a lot goes out and enters again.
when new players enter the room or return, they receive at once all the prafabs that were instantiated by other players and even from him if he has already been there.
it is not in my interest that he receives this history, when entering the room he should not receive anything, like a blank room.

I'm not advanced without a photon unit network, and my game is all structured in PUN1.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2021
    Options
    Hi @Alberto,

    This is by design.
    Instantiated networked objects and buffered RPCs are cached events that will be received when joining the room.
    If you don't want this behaviour you can skip using networking instantiation and just use RaiseEvent and custom properties.
    But of course there are ways to clear cached events (including instantiation event and buffered RPCs) but this will clean up will be applied to any rejoining or new player alike.