> For the complete documentation index, see [llms.txt](https://santutu.gitbook.io/rts-selection-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://santutu.gitbook.io/rts-selection-system/integration/iselectable-interface.md).

# ISelectable Interface

`ISelectable` is an interface that defines the properties and behaviors required for objects that can be selected in a game system.&#x20;

❗  Please refer to the "[ISelectable Implementation Example](/rts-selection-system/integration/iselectable-implementation-example.md)" section.

```csharp
public interface ISelectable
{
    public GameObject gameObject { get; }

    public bool enabled { get; set; }

    // Primary selection priority value. Used for primary filtering of selectable objects. 
    public int SelectionPriority1 { get; } 
    
    //Secondary selection priority value. Used for secondary filtering of selectable objects.
    public int SelectionPriority2 { get; } 
    
    //Tertiary selection priority value. Used for tertiary filtering of selectable objects.
    public int SelectionPriority3 { get; } 

    public int Order { get; }
    public int SubGroupId { get; }

    public bool CanBeMultiSelected { get; }
    public bool CanBeGrouped { get; }
    public bool CanBeSelected { get; }

    public UnityEvent<bool> OnSelectChanged { get; }
    public UnityEvent<bool> OnHoverChanged { get; }

    public bool IsNull => this as Component == null;

    public bool IsSameSelectable(ISelectable other)
    {
        return SubGroupId == other.SubGroupId
               && SelectionPriority1 == other.SelectionPriority1
               && SelectionPriority2 == other.SelectionPriority2
               && SelectionPriority3 == other.SelectionPriority3;
    }
}
```
