/ SDKs / Unity
SDKs
Calls SDKs Unity v1
Calls SDKs Unity
Calls SDKs
Unity
Version 1

Receive events

Copy link

Participants in a room can receive events from the Sendbird server when other participants in the room have updated or deleted custom items. To receive events from other participants, use OnCustomItemsUpdated() and OnCustomItemsDeleted(). Each event contains the list of keys of the updated or deleted custom items in updatedKeys and deletedItemKeys respectively.

Modification of custom items and delivery of events in the event handlers can only be done when the room status is Open and there are participants in the room. To see which custom items have been changed for ongoing or ended group calls in a room, you can use the Calls API or the room.FetchCustomItems() method.

class MyRoomListener : SbRoomEventListener
{
   public void OnCustomItemsUpdated(ReadOnlyCollection<string> updatedKeys)
   {
       // Custom items with updatedKeys have been updated in the target room.
   }

   public void OnCustomItemsDeleted(ReadOnlyCollection<string> deletedItemKeys)
   {
       // Custom items with deletedKeys have been deleted in the target room.
   }
}