ScriptableObject が破棄されるとき、この関数は呼び出されます。
function OnDestroy () {
print("Script was destroyed");
}
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void OnDestroy() { print("Script was destroyed"); } }
OnDestroy はコルーチンにすることができません。