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
> cd [任意のフォルダ] | |
> git clone https://github.com/Microsoft/MRDesignLabs_Unity | |
> cd MRDesignLabs_Unity | |
> git submodule init | |
> git submodule update |
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
//Defaultの設定を使用して表示を行う。 | |
LoadingDialog.Instance.Open("");//現行引数なし指定のものがない(後でIssueする) | |
//デフォルトの設定値を変更して呼び出す。(その1) | |
LoadingDialog.Instance.Open( | |
LoadingDialog.IndicatorStyleEnum.StaticIcon, // アイコン表示 | |
LoadingDialog.ProgressStyleEnum.None, //状況表示なし | |
LoadingDialog.MessageStyleEnum.Visible, //メッセージ表示 | |
); |
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
// Copyright(c) 2017 Takahiro Miyaura | |
// Released under the MIT license | |
// http://opensource.org/licenses/mit-license.php | |
using System.Collections; | |
using System.Collections.Generic; | |
using HUX.Collections; | |
using HUX.Interaction; | |
using HUX.Receivers; | |
using UnityEngine; |
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
FocusManager.Instance.FocusedObjects |
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
// Copyright(c) 2017 Takahiro Miyaura | |
// Released under the MIT license | |
// http://opensource.org/licenses/mit-license.php | |
/// <summary> | |
/// Read sampling Data from Microphone. | |
/// </summary> | |
/// <param name="buffer">Sampling Data.</param> | |
/// <param name="numChannels">number of audio channels.</param> | |
private void OnAudioFilterRead(float[] buffer, int numChannels) |
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
// Copyright(c) 2017 Takahiro Miyaura | |
// Released under the MIT license | |
// http://opensource.org/licenses/mit-license.php | |
private void OnAudioFilterRead(float[] buffer, int numChannels) | |
{ | |
if (!_isStart) return; | |
lock (this) | |
{ |
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
// Copyright(c) 2017 Takahiro Miyaura | |
// Released under the MIT license | |
// http://opensource.org/licenses/mit-license.php | |
// setup the data writer | |
dataWriter = new DataWriter(webSocket.OutputStream); | |
dataWriter.ByteOrder = ByteOrder.LittleEndian; | |
dataWriter.WriteBytes(GetWaveHeader()); | |
//// flush the dataWriter periodically |
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
public Task async Hoge() | |
{ | |
//非同期1つ目。待たなくてもいいパターン | |
ExecuteAsync(); | |
//非同期2つ目。後続がこの処理の結果を必要とするので待つ必要がある。 | |
var result = await ExecuteAsync2(); | |
//非同期3つ目。2つ目の結果を受け取って処理する。 | |
await ExecuteAsync3(result); |
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
// Copyright(c) 2017 Takahiro Miyaura | |
// Released under the MIT license | |
// http://opensource.org/licenses/mit-license.php | |
AppCallbacks.Instance.InvokeOnUIThread(async () => | |
{ | |
//UIスレッド(UWP)側での対処が必要な処理 | |
AppCallbacks.Instance.InvokeOnAppThread(() => { | |
//Appスレッド(Unity)側での対処が必要な処理 |
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
// Copyright(c) 2017 Takahiro Miyaura | |
// Released under the MIT license | |
// http://opensource.org/licenses/mit-license.php | |
var devices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture); | |
var device = devices[0]; | |
var capture = new MediaCapture(); | |
var settings = new MediaCaptureInitializationSettings | |
{ | |
VideoDeviceId = device.Id | |
}; |