You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
412 B
C#
22 lines
412 B
C#
6 months ago
|
using UnityEngine;
|
||
|
using UnityEngine.InputSystem;
|
||
|
|
||
|
public class InputActionEnabler : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField]
|
||
|
InputActionAsset m_ActionAsset;
|
||
|
public InputActionAsset actionAsset
|
||
|
{
|
||
|
get => m_ActionAsset;
|
||
|
set => m_ActionAsset = value;
|
||
|
}
|
||
|
|
||
|
private void OnEnable()
|
||
|
{
|
||
|
if (m_ActionAsset != null)
|
||
|
{
|
||
|
m_ActionAsset.Enable();
|
||
|
}
|
||
|
}
|
||
|
}
|