← Back to all addons

[BUG FIX] Input device icons reset to "Mouse/Keyboard" when switching scenes

Posted by Gyvr on Oct 29, 2025 at 10:20 PM

Bug Fix
❤️ 2 🔥 2

When switching scenes (main menu -> gameplay, and vice-versa), the input device icons (mouse & keyboard / XBOX / PS) always get reset to mouse & keyboard.

To prevent that, we can store (using PlayerPrefs) the last detected input device, and retrieve it when a new scene is loaded.

In UIControllerButtonManager.cs:

In Start(), replace:

UpdateControllerType(GameManager.InputSystem.playerInput);

with:

if (PlayerPrefs.HasKey("controller_type"))
{
    SetControllerType((EControllerType)PlayerPrefs.GetInt("controller_type"));
}
else
{
    UpdateControllerType(GameManager.InputSystem.playerInput);
}

In OnDestroy(), add this line anywhere inside the function:

PlayerPrefs.SetInt("controller_type", (int)m_controllerType);

💬 Comments (0)

Be the first to comment! Join our Discord to share your thoughts.

Want to continue the conversation?