Skip to content

Commit b5272cd

Browse files
committed
Added missing namespace to RebindSaveLoad
1 parent 1f0514c commit b5272cd

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
using UnityEngine;
2-
using UnityEngine.InputSystem;
3-
4-
public class RebindSaveLoad : MonoBehaviour
1+
namespace UnityEngine.InputSystem.Samples.RebindUI
52
{
6-
public InputActionAsset actions;
7-
8-
public void OnEnable()
3+
public class RebindSaveLoad : MonoBehaviour
94
{
10-
var rebinds = PlayerPrefs.GetString("rebinds");
11-
if (!string.IsNullOrEmpty(rebinds))
12-
actions.LoadBindingOverridesFromJson(rebinds);
13-
}
5+
public InputActionAsset actions;
146

15-
public void OnDisable()
16-
{
17-
var rebinds = actions.SaveBindingOverridesAsJson();
18-
PlayerPrefs.SetString("rebinds", rebinds);
7+
public void OnEnable()
8+
{
9+
var rebinds = PlayerPrefs.GetString("rebinds");
10+
if (!string.IsNullOrEmpty(rebinds))
11+
actions.LoadBindingOverridesFromJson(rebinds);
12+
}
13+
14+
public void OnDisable()
15+
{
16+
var rebinds = actions.SaveBindingOverridesAsJson();
17+
PlayerPrefs.SetString("rebinds", rebinds);
18+
}
1919
}
2020
}

0 commit comments

Comments
 (0)