9092858a58
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
21 lines
487 B
C#
21 lines
487 B
C#
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
|
|
public class RebindSaveLoad : MonoBehaviour
|
|
{
|
|
public InputActionAsset actions;
|
|
|
|
public void OnEnable()
|
|
{
|
|
var rebinds = PlayerPrefs.GetString("rebinds");
|
|
if (!string.IsNullOrEmpty(rebinds))
|
|
actions.LoadBindingOverridesFromJson(rebinds);
|
|
}
|
|
|
|
public void OnDisable()
|
|
{
|
|
var rebinds = actions.SaveBindingOverridesAsJson();
|
|
PlayerPrefs.SetString("rebinds", rebinds);
|
|
}
|
|
}
|