-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
・ショートカットキー機能 ・ハンドジェスチャー設定 ・表情設定 ・機能キー設定 ・手の角度の補正機能 ・キャリブレーション時にコントローラーのトリガーで開始できるように ・UIをWinFormsからWPFの別アプリに変更 ・自動まばたきが完全に閉じなかったり開かなかったりする問題修正 ・使用しているVRIKCalibrator.csが直接編集されてしまっていたので修正 その他軽微なバグやnullチェックの追加
- Loading branch information
Showing
95 changed files
with
7,659 additions
and
4,769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
Assets/ExternalPlugins/UnityNamedPipe/MainThreadInvoker.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Concurrent; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
public class MainThreadInvoker : MonoBehaviour { | ||
|
||
private class ActionInfo | ||
{ | ||
private Action runAction; | ||
public bool Finished; | ||
public ActionInfo(Action action) | ||
{ | ||
runAction = action; | ||
} | ||
public void Execute() | ||
{ | ||
runAction(); | ||
Finished = true; | ||
} | ||
} | ||
private ConcurrentQueue<ActionInfo> actionQueue = new ConcurrentQueue<ActionInfo>(); | ||
|
||
void Start() | ||
{ | ||
StartCoroutine(InvokeLoop()); | ||
} | ||
|
||
public async Task InvokeAsync(Action action) | ||
{ | ||
Debug.Log("InvokeAsync:" + action.GetType().ToString()); | ||
var actionInfo = new ActionInfo(action); | ||
actionQueue.Enqueue(actionInfo); | ||
while(actionInfo.Finished == false) | ||
{ | ||
await Task.Delay(10); | ||
} | ||
} | ||
|
||
public void BeginInvoke(Action action) | ||
{ | ||
actionQueue.Enqueue(new ActionInfo(action)); | ||
} | ||
|
||
IEnumerator InvokeLoop() | ||
{ | ||
while (true) | ||
{ | ||
yield return new WaitForSeconds(0.01f); | ||
|
||
ActionInfo actionInfo; | ||
while (actionQueue.TryDequeue(out actionInfo)) | ||
{ | ||
actionInfo.Execute(); | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/ExternalPlugins/UnityNamedPipe/MainThreadInvoker.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
Assets/ExternalPlugins/UnityNamedPipe/UnityNamedPipe.dll.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.