Shared Utilities
Documentation for the core utility libraries used across BlinkBox addons
Introduction
The Shared Utilities package provides a set of common, reusable components that ensure consistency across all BlinkBox addons. These include UI managers, loading screens, and helper tools.
Dialog System
A centralized system for showing popups, confirmations, and notifications.
Usage
// Show a simple popup with callbacks
DialogManager.Instance.ShowPopup("Delete Item?", "Are you sure you want to delete this?",
onConfirm: () => {
Debug.Log("Item deleted");
},
onCancel: () => {
Debug.Log("Cancelled");
}
);
// Show a non-blocking notification
DialogManager.Instance.ShowNotification("Settings saved successfully", duration: 2f);
// Show a request notification (Accept/Decline)
DialogManager.Instance.ShowRequestNotification("Friend Request", "Player123 wants to be friends",
onAccept: () => AcceptRequest(),
onDecline: () => DeclineRequest()
);
Toast System
A lightweight notification system for showing success, error, or warning messages that slide in/out.
Usage
// Show a success toast
bl_ToastManager.Instance.Show(ToastType.Success, "Mission Completed!");
// Show an error toast
bl_ToastManager.Instance.Show(ToastType.Error, "Connection Failed");
// Show a warning
bl_ToastManager.Instance.Show(ToastType.Warning, "Low Health");
Configuration
Toast colors, icons, and animation speeds can be configured in the bl_ToastManager inspector.
Loading System
A global loading screen manager that persists between scenes.
Usage
// Show loading screen
bl_GlobalLoading.Show("Connecting to server...");
// Hide loading screen
bl_GlobalLoading.Hide();
// Show an error on the loading screen (doesn't hide it)
bl_GlobalLoading.ShowError("Failed to connect. Retrying...");
Character Extracter
A tool for extracting and displaying character models from the game's player selector system. Useful for UI previews.
Usage
// Spawn the currently selected character at a specific transform
bl_CharacterExtracter.Instance.SpawnCurrentCharacter(previewTransform);
// Spawn a specific character by ID
bl_CharacterExtracter.Instance.SpawnCharacterByID(2, previewTransform);
// Rotate the spawned character
bl_CharacterExtracter.Instance.RotateCharacter(Input.GetAxis("Mouse X"));
Web Graph Dev
A procedural graph rendering system capable of drawing Radar, Bar, Line, and Pie charts using Unity UI (MaskableGraphic).
Features
- Multiple Graph Types: Radar (Spider), Bar, Line, Pie.
- Normalization: Automatically scales values to fit the graph area.
- Animation: Supports animating values from 0 to 1 on start.
- Customization: Extensive settings for colors, line widths, and grid segments.