Skip to content

Commit 10244f2

Browse files
committed
fix focus problem
1 parent 36e0490 commit 10244f2

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Raffler/Assets/Scenes/SampleScene.unity

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Raffler/Assets/Scripts/SettingsBehaviour.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using TMPro;
33
using UnityEngine;
4-
using UnityEngine.UI;
4+
using UnityEngine.EventSystems;
55

66
namespace DefaultNamespace
77
{
@@ -28,6 +28,11 @@ private void Start()
2828
public void ToggleSettingsPanel()
2929
{
3030
ShowSettingsPanel = !ShowSettingsPanel;
31+
32+
if (!ShowSettingsPanel)
33+
{
34+
EventSystem.current.SetSelectedGameObject(null);
35+
}
3136
}
3237

3338
private void Update()

0 commit comments

Comments
 (0)