【m】停止运行时清空静态对象
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Internal;
|
||||
|
||||
@@ -23,6 +24,17 @@ namespace Stary.Evo.AudioCore
|
||||
coroutineRunner.StopCoroutine(myCoroutine);
|
||||
}
|
||||
|
||||
private class CoroutineRunner : MonoBehaviour { }
|
||||
private class CoroutineRunner : MonoBehaviour
|
||||
{
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (coroutineRunner != null)
|
||||
{
|
||||
coroutineRunner.StopAllCoroutines();
|
||||
coroutineRunner = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user