Xamarin iOS에서 VR 리모컨 사용
3381 단어 Xamarin.iOSXamarinVR
리모컨을 게임패드 모드로 동작시키려면, 「Select」버튼을 누르면서 전원 스위치를 「iOS」측으로 슬라이드 시킨다. 자세한 내용은 취급 설명서을 참조하십시오.

버튼 마다 알파벳을 두개 기재하고 있는 것은, down/up에 대응. 버튼을 밀어 넣었을 때와 떼어 놓았을 때, 각각으로 키 코드가 보내 오는 사양으로, 키 반복과 같은 것이 아니기 때문에, 「누르고 있는 동안」과 같은 처리가 쓰기 쉽다고 한다.
Xamarin.iOS에서 사용하기 위한 코드는 아래와 같습니다.
ViewController.cs
public partial class ViewController : UIViewController
{
public override void ViewDidLoad()
{
base.ViewDidLoad();
// add key-commands
var action = new Selector("KeyTouched:");
foreach (var alp in Enumerable.Range('a', 26))
{
AddKeyCommand(UIKeyCommand.Create(new NSString(((char)alp).ToString()), 0, action));
}
}
[Export("KeyTouched:")]
private void KeyTouched(UIKeyCommand command)
{
Console.WriteLine(command.Input);
}
}
Reference
이 문제에 관하여(Xamarin iOS에서 VR 리모컨 사용), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/hIDDEN_xv/items/59d9fdebc571fdda71b0텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)