fix light issue and dispose IPC after wacvr closed
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
|
||||
// Code from https://forum.unity.com/threads/cant-run-my-coroutine-ondestroy.785756/
|
||||
// Credit: Kurt-Dekker (https://forum.unity.com/members/kurt-dekker.225647/)
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class CallAfterDelay : MonoBehaviour
|
||||
{
|
||||
float delay;
|
||||
System.Action action;
|
||||
|
||||
public static CallAfterDelay Create( float delay, System.Action action)
|
||||
{
|
||||
CallAfterDelay cad = new GameObject("CallAfterDelay").AddComponent<CallAfterDelay>();
|
||||
cad.delay = delay;
|
||||
cad.action = action;
|
||||
return cad;
|
||||
}
|
||||
|
||||
IEnumerator Start()
|
||||
{
|
||||
yield return new WaitForSeconds( delay);
|
||||
action();
|
||||
Destroy ( gameObject);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52bc75ed574f3bd4ca7a24c6d17ab760
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user