Editor Mode Debugging
Debugging is Editor mode is very crucial for faster app turn around and efficient development cycles. To that end, the SDK offers ways to emulate the experience right in the Editor mode.
Head tracking can be emulated in the Editor mode by using the W, A, S, D keys to emulate head rotation while playing in Editor mode.
Emulate a succesfull controller connection in the Editor by pressing “U” once you in Play mode. This emulates the controller being paired and ready to be used with the application.
Other states and their key-bindings are as follows
- T - BLE INACTIVE
- Y - SCAN_ERROR
- U - SUBSCRIBED
- I - DEVICE_NOT_FOUND
- O - FOUND_CONTROLLER
- P - CONNECTING
- V - RECONNECTING
- B - TROUBLESHOOT
- N - CONNECTED 10.M - UNSUBSCRIBED
Selecting Controller Button To Press
In Editor Mode, you can emulate the controller buttons and orientation using your keyboard. The CONTROLLER_BUTTON are mapped to the following keys on the keyboard -
- G - APP_BUTTON
- H - HOME_BUTTON
- J - CLICK_BUTTON
- K - VOL_UP
- L - VOL_DOWN
Selecting Controller Interaction To Emulate
Moreover, in order to emulate controller interactions, you can press the following keys -
- Numpad1 - OnSingleClickConfirm
- Numpad2 - OnDoubleClick
- Numpad3 - OnLongPressStart
- Numpad4 - OnLongPressEnd
- Numpad5 - OnSwipeVertical (Swipe Up)
- Numpad6 - OnSwipeVertical (Swipe Down)
- Numpad7 - OnSwipeHorizontal (Swipe Left)
- Numpad8 - OnSwipeHorizontal (SwipeRight)
Emulating Controller Orientation
You can emulate changing Controller’s orientation in space by pressing "Z" for Anti-Clockwise rotation and "X" for Clockwise rotation.
You can use the above Key-Bindings to emulate the entire controller experience -
Example 1 - To emulate Single Click of APP_BTN -
Press G once and then Press Numpad 1.
Example 2 : To emulate Double Click of HOME_BTN -
Press H once and then Press Numpad 2.
Example 3 : To emulate Swiping Up on the Touchpad -
Example 4 : To emulate Rotating the Controller -
Press Z or X
Example 5 : To emulate rotating a GameObject that has a HighLevel_ARInteractibleExample.cs attached, where the Rotation Button is BTN -
Press H and then Press Numpad3 to activate rotation. Then press Z or X to rotate the Hologram.
Go ahead and try it!