Detailed Method Reference
Namespace: Canley.Utility.ColourPicker
Class: CanleyColourController
ClosePicker
public void ClosePicker()- Description: A low-level utility method to immediately deactivate the Colour Picker UI panel.
- Workflow:
- Deactivation: Sets the
_pickerPanelGameObject tofalse. - Event Dispatch: Invokes the
OnPickerClosedaction, allowing external systems to handle cleanup (e.g., re-enabling player movement or other UI layers).
- Deactivation: Sets the
- Returns:
void - Example:
using UnityEngine;
using Canley.Utility.ColourPicker;
public class GameStateManager : MonoBehaviour
{
[SerializeField] private CanleyColourController _picker;
public void ForceQuitUI()
{
// Immediately shuts down the picker without
// triggering confirmation or cancellation logic.
_picker.ClosePicker();
}
}NOTE
Unlike ConfirmSelection or CancelSelection, this method does not include a timed delay for animations or any haptic feedback. Use this for instant, programmatic UI management.