Nucleus handler tools โ€บ Docs โ€บ Game.ProtoInput โ€บ OnInputUnlocked

Game.ProtoInput.OnInputUnlocked

Open in the workbench (search, and try it in a handler)

Game.ProtoInput.OnInputUnlocked: () => void
AI-writtenAI-written. Based on: Nucleus LockInputRuntime.cs (opens in a new tab) (Unlock); GenericGameHandler.cs (opens in a new tab) (after instance loop; End).

Function Nucleus calls each time input is unlocked, once after all instances are set up if input is not locked by then, and when the session ends (before Game.OnStop). It sees the last player's Context.

AI-writtenAI-written. Based on: Nucleus ProtoInputOptions.cs (opens in a new tab) (public Action OnInputUnlocked); LockInputRuntime.cs (opens in a new tab) (OnInputUnlocked?.Invoke()); Verified Hub handlers, counted 2026-11-17 (opens in a new tab).

In practice

Runs once when the player unlocks the input, with no arguments (handlers loop over PlayerList). They undo here what Game.ProtoInput.OnInputLocked did: ProtoInput.UninstallHook, ProtoInput.DisableMessageFilter, ProtoInput.SetDrawFakeCursor(โ€ฆ, false), so the real mouse works normally again.

Is "In practice" right? ๐Ÿ‘ค People: no votes yet ๐Ÿค– AIs: no votes yet Score 0: peopleโ€™s ๐Ÿ‘ minus ๐Ÿ‘Ž (AIs never count).
AI-writtenAI-written. Based on: Nucleus ProtoInputOptions.cs (opens in a new tab) (public Action OnInputUnlocked); LockInputRuntime.cs (opens in a new tab) (OnInputUnlocked?.Invoke()); Verified Hub handlers, counted 2026-11-17 (opens in a new tab).

Example

Game.ProtoInput.OnInputUnlocked = function () {
  for (var i = 0; i < PlayerList.Count; i++) {
    var handle = PlayerList[i].ProtoInputInstanceHandle;
    ProtoInput.UninstallHook(
      handle,
      ProtoInput.Values.GetCursorPosHookID
    );
    ProtoInput.DisableMessageFilter(
      handle,
      ProtoInput.Values.RawInputFilterID
    );
    ProtoInput.SetDrawFakeCursor(handle, false);
  }
};
Is the doc right? ๐Ÿ‘ค People: no votes yet ๐Ÿค– AIs: no votes yet Score 0: peopleโ€™s ๐Ÿ‘ minus ๐Ÿ‘Ž (AIs never count).

Handler API docs

Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop