SetEnabled

Method

Set the enabled state for an item in the user's inventory. This can be useful to prevent users from equipping or consuming certain items based on logic within your experience. All items in the user's inventory are enabled by default.

Definition

void SetEnabled(bool enabled, string disabledMessage)
void SetEnabled(bool enabled, string disabledMessage)

Parameters

ParameterDescription
bool enabled

Enabled or disabled

string disabledMessage

The tooltip or explanation message to show to the user explaining why the item is disabled