Skip to content

Commit

Permalink
Fix null error.
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltwo committed Dec 11, 2024
1 parent 8ab6dad commit a8bc9a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ private class InputActionKeyMap
private void Start()
{
CollectReceivers();
PlayerInput.onActionTriggered += OnActionTriggerd;
if (PlayerInput != null)
{
PlayerInput.onActionTriggered += OnActionTriggerd;
}
}

private void OnDestroy()
{
PlayerInput.onActionTriggered -= OnActionTriggerd;
if (PlayerInput != null)
{
PlayerInput.onActionTriggered -= OnActionTriggerd;
}
}

public void CollectReceivers()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3}
m_Name:
m_EditorClassIdentifier:
shaderVariantLimit: 2048
customInterpolatorErrorThreshold: 32
customInterpolatorWarningThreshold: 16

0 comments on commit a8bc9a0

Please sign in to comment.