Skip to content

Profectus / features/clickables/clickable / setupAutoClick

Function: setupAutoClick() ​

setupAutoClick(layer, clickable, autoActive): Unsubscribe

Utility to auto click a clickable whenever it can be.

Parameters ​

layer ​

BaseLayer

The layer the clickable is apart of

clickable ​

Clickable

The clicker to click automatically

autoActive ​

MaybeRefOrGetter<boolean> = true

Whether or not the clickable should currently be auto-clicking

Returns ​

Unsubscribe

Defined in ​

profectus/src/features/clickables/clickable.tsx:124