fix light issue and dispose IPC after wacvr closed

This commit is contained in:
xpeng
2022-11-08 21:23:25 +01:00
parent 1db320fa5d
commit a7ce4f3900
8 changed files with 1772 additions and 4 deletions
+26
View File
@@ -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: