Skip to content

Instantly share code, notes, and snippets.

@dyguests
Created June 2, 2024 12:44
Show Gist options
  • Save dyguests/65c5015209309ea3a735809b2d8d1d7f to your computer and use it in GitHub Desktop.
Save dyguests/65c5015209309ea3a735809b2d8d1d7f to your computer and use it in GitHub Desktop.
CommonInput.cs
using UnityEngine;
namespace Inputs
{
public abstract class CommonInput : MonoBehaviour
{
protected InputActions InputActions { get; private set; }
protected virtual void Awake()
{
InputActions = new InputActions();
}
protected virtual void OnEnable()
{
InputActions.Enable();
}
protected virtual void OnDisable()
{
InputActions.Disable();
}
public interface ICallback
{
void Return();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment