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:
    1. Deactivation: Sets the _pickerPanel GameObject to false.
    2. Event Dispatch: Invokes the OnPickerClosed action, allowing external systems to handle cleanup (e.g., re-enabling player movement or other UI layers).
  • 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.