-
-
Save KzoNag/730513e7db2620649260cdadf5df9c78 to your computer and use it in GitHub Desktop.
ブログ用 - ハンドデバイス定義
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
#if UNITY_EDITOR | |
[InitializeOnLoad] | |
#endif | |
[Preserve] | |
[InputControlLayout(displayName = "Hand Pointer", stateType = typeof(HandDeviceState), commonUsages = new[] { "LeftHand", "RightHand" }, isGenericTypeOfDevice = false)] | |
public class HandDevice : XRController | |
{ | |
public AxisControl grip { get; private set; } | |
public ButtonControl gripButton { get; private set; } | |
protected override void FinishSetup() | |
{ | |
base.FinishSetup(); | |
grip = GetChildControl<AxisControl>(nameof(grip)); | |
gripButton = GetChildControl<ButtonControl>(nameof(gripButton)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment