Remove listener

When your object/actor is done with listening you can simply call, Unregister Listener node to remove the given listener from subsystem.

Unregister listener node.

If you want to remove all listeners for any reason, call Unregister All Listeners node.

Removes all callbacks.

In C++, you can access the Agora Global Events World Subsystem via the static function Get and then call the UnregisterListener.

Make sure you add this plugin as dependency otherwise you'll get LNK errors.

Add below code under your desired function.

auto AgoraEventsSubsystem = UAgoraGlobalEventsWorldSubsystem::Get(*GetWorld());
AgoraEventsSubsystem->UnregisterListener(this);

// to remove all listeners
AgoraEventsSubsystem->UnregisterAllListeners();

Last updated