Fix bug with DisableAfterFinish null reference

This commit is contained in:
r.nikolin 2023-10-31 11:52:24 +03:00
parent c6169add04
commit 1297d08805
2 changed files with 7 additions and 1 deletions

View File

@ -17,11 +17,17 @@ public class DisableAfterFinish : MonoBehaviour
private void OnEnable()
{
if (disableController == null)
return;
disableController.DoDisable += Disable;
}
private void OnDisable()
{
if (disableController == null)
return;
disableController.DoDisable -= Disable;
}

View File

@ -267,7 +267,7 @@ MonoBehaviour:
Sound:
Clip: {fileID: 0}
Volume: 1
Priority: 128
Priority: 256
Pitch: 1
Zone: 0
PlayOnAwake: 0