UCrowdControlSubsystem
Inherits UGameInstanceSubsystem
The game-instance subsystem that loads the Crowd Control DLL and owns authentication, connection state, effect registration and dispatch, effect responses, menu state, metadata, and game sessions.
In Blueprint, get it from the Game Instance with Get Subsystem (Crowd Control Subsystem). In C++, use UGameInstance::GetSubsystem<UCrowdControlSubsystem>() or UCrowdControlSubsystem::Get.
Public Member Functions
void
Initializes the game-instance subsystem and loads the Crowd Control DLL.
void
Stops Crowd Control and releases the subsystem's resources.
void
Loads CrowdControl.dll, resolves its exported API, and applies the configured game pack, application ID, and session-start behavior. Normally called during subsystem initialization.
void
C++ only. Starts the runnable that services the loaded Crowd Control runtime. Connect normally starts it for you.
int32
Returns the raw connection state: 0 connecting, 1 disconnected, 2 waiting for login, or 3 connected.
void
Starts the Crowd Control connection thread.
void
Disconnects from Crowd Control.
void
Clears the current login and resets the connection.
void
Deprecated. Requests legacy Twitch login. Use RequestAuthCode for application authentication.
void
Deprecated. Requests legacy YouTube login. Use RequestAuthCode for application authentication.
void
Deprecated. Requests legacy Discord login. Use RequestAuthCode for application authentication.
void
Requests a new application authorization code. ApplicationID must be configured; the result is broadcast by OnAuthCodeReceived.
void
Starts a game session explicitly. Use this when automatic session start is disabled.
void
Stops the active game session.
void
Registers an instant effect with the loaded Crowd Control runtime.
void
Registers a timed effect with the loaded Crowd Control runtime.
void
Registers an effect with quantity and/or viewer-selectable parameters.
bool
Clones a registered effect definition to one new destination ID. The Blueprint return value reports whether the clone was created.
bool
Atomically clones a registered effect definition to multiple new destination IDs. The Blueprint return value reports whether every clone was created.
void
Reports that a request completed successfully.
void
Reports success with a message for the purchasing user.
void
Reports a temporary failure without a message.
void
Reports a temporary failure with a message for the purchasing user.
void
Reports that a request cannot run now and may be retried or refunded.
void
Reports that a request can never run and must not be retried.
bool
Reports one visibility or availability state for an effect. Visibility and availability are independent.
bool
Shows or hides one effect in the Crowd Control menu.
bool
Enables or disables purchases for one effect without changing its visibility.
void
Sends one key/value pair of pack metadata through the compatibility export.
void
Sends a JSON object in a packMetadataChanged RPC.
void
Sends one key/value pair of game-state metadata.
bool
Returns whether the named timed effect is running.
void
Pauses a running timed effect and reports the pause.
void
Resumes a paused timed effect and reports the resume.
void
Resets a running timed effect.
void
Stops a running timed effect.
bool
Returns whether the DLL has an active Crowd Control connection.
bool
Returns whether authentication and subscription are complete and effects are ready.
void
Writes the registered effect manifest to Saved/CCMenu.json.
FString
Returns the authenticated user's origin identifier from the JWT.
FString
Returns the authenticated user's profile type from the JWT.
FString
Returns the interaction URL from the authenticated user's JWT.
FString
Returns the display name of the authenticated streamer.
bool
Returns whether the stored JWT exists and is not expired.
void
Shows the listed effects. An empty array applies the operation to all registered effects.
void
Hides the listed effects. An empty array applies the operation to all registered effects.
void
Makes the listed effects purchasable. An empty array applies the operation to all registered effects.
void
Makes the listed effects unavailable for purchase. An empty array applies the operation to all registered effects.
void
C++ only. Uploads custom-effect definitions from a JSON string.
void
Uploads one custom instant effect.
void
Uploads one custom timed effect.
void
Uploads one custom parameter effect.
void
Uploads multiple custom instant effects in one request.
void
Uploads multiple custom timed effects in one request.
void
Uploads multiple custom parameter effects in one request.
void
Replaces the current custom-effect set with an empty set.
void
Deletes all custom effects.
void
Deletes custom effects whose IDs are supplied as a JSON array string.
void
Deletes custom effects by ID. An empty array deletes all custom effects.
FString
Returns the current custom-effect definitions as JSON.
void
C++ only. Registers a component as the request handler for its effect ID.
void
C++ only. Removes a component from effect-request routing.
Public Static Functions
UCrowdControlSubsystem&
Returns the Crowd Control subsystem for the world associated with WorldContextObject.
Events
FOnTriggerEffect
(FString, FString, FString, FString)
OnEffectTrigger
Broadcast for an instant effect that is not routed to an effect component. Parameters are request ID, display name, effect ID, and viewer name.
FOnTriggerTimedEffect
(FString, FString, float, FString, FString)
OnTimedEffectTrigger
Broadcast for a timed effect that is not routed to an effect component. Parameters are request ID, display name, duration, effect ID, and viewer name.
FOnTriggerParameterEffect
(FString, FString, FString, FJsonObjectWrapper, FString, FString)
OnParameterEffectTrigger
Broadcast for a parameter effect that is not routed to an effect component. OptionalQuantity is currently a string in this delegate.
FOnCommandIDChanged
(int32)
OnCommandIDChanged
Broadcast whenever the raw connection-state command ID changes.
FOnConnectionStateChanged
(ECrowdControlConnectionState)
OnConnectionStateChanged
Broadcast whenever the typed connection state changes.
FOnSessionReady
OnSessionReady
Broadcast once each time the connection becomes fully ready to process effects.
FOnEffectRequestReceived
(FString, FString, FString, FString, float, int32)
OnEffectRequestReceived
Broadcast for every incoming request before component or global-delegate routing. Intended for notifications and HUDs; it does not replace responding to the request.
FOnAuthCodeReceived
(FString, FString)
OnAuthCodeReceived
Broadcast with the authorization code and URL after RequestAuthCode succeeds.
