Skip to main content

Helpshift APIs for PC Widget

This page provides a list of APIs available for the Helpshift PC widget along with their descriptions, parameters, and usage examples.

Helpshift.Initialize

Description:
Initializes the Helpshift widget and runs it in the background, enabling it to listen for notifications. If notifications are a high priority, this method should be called when the game starts to ensure timely event handling.

Parameters:

ParameterTypeDescription
pathstringThe base path to the application's streaming assets, e.g., Application.streamingAssetsPath.
helpshiftConfigobjectA configuration object for the widget.

Example Usage:

Helpshift.Initialize(Application.streamingAssetsPath, helpshiftConfig);

Helpshift.Show

Description:
Displays the Helpshift widget on the screen. This is typically invoked during the on-click action of a clickable element (e.g., a button). Ensure that Helpshift.Initialize() has been called earlier in the game flow before invoking this method; otherwise, the widget will not function properly.

Parameters:

None

Example Usage:

Helpshift.Show();

Helpshift.Hide

Description:
Temporarily hides the Helpshift widget from the screen. This can also be triggered by clicking the "X" button on the widget. This method is typically used when the widget should be hidden to minimize distractions, adjust to UI changes, or ensure a smooth user experience during focused gameplay moments such as cutscenes, high-concentration sequences, or transitions between states. The widget remains active in the background to handle notifications.

Parameters:

None

Example Usage:

Helpshift.Hide();

Helpshift.CleanUp

Description:
Destroys the Helpshift widget and terminates its background process. This method should be called during game shutdown to release resources and ensure proper cleanup. Call this inside Unity's OnApplicationQuit() method.

Parameters:

None

Example Usage:

Helpshift.CleanUp();

Helpshift.Update (Optional)

Description:
Handles events sent from the Helpshift widget to Unity. This method is typically called inside Unity's Update() method. Note that this is optional in the current workflow as no events are being sent from the widget to Unity.

Parameters:

None

Example Usage:

Helpshift.Update();