-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
28,090 additions
and
24,628 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
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 |
---|---|---|
@@ -1,7 +1,21 @@ | ||
# OnInputDown/OnInputUp | ||
|
||
Add the InputActionHandler to your GameObject and select the Input Action Type (Stylus Action or Stylus Back). | ||
Add the InputActionHandler to your GameObject and select the Input Action Type `Select` or `Stylus Back`. | ||
Configure if you want the events to trigger only if the GameObject is focused. | ||
<p align="center"> | ||
<img src="imgs/Event_OnInput.png" width="70%"> | ||
</p> | ||
</p> | ||
|
||
```csharp | ||
public void OnInputDown(BaseInputEventData inputEventData) | ||
{ | ||
if (inputEventData.InputSource.SourceName.Contains("Stylus")) | ||
{ | ||
// Stylus XR Input Down!! | ||
// do stuff... | ||
} else { | ||
// Other Controller Input Down | ||
// do stuff... | ||
} | ||
} | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Stylus XR User Interface | ||
|
||
When you look inside the **Stylus** prefab, there is another prefab called **StylusUI**. | ||
When this GameObject is in the Scene, you will get a out-of-the-box working UI Panel to list/connect to the devices. | ||
If you want to create your own UI, have a look inside `Holo-Light/STK/Core/Connection/StylusUI.cs`. There you can see how it is made. | ||
|
||
<p align="center"> | ||
<img src="imgs/StylusUI.png" width="45%"> | ||
<img src="imgs/StylusUI2.png" width="45%"> | ||
</p> | ||
|
||
|
||
Basically you just need a reference to HoloStylusManager which exists only on the **Stylus** GameObject. | ||
There you can register for different types of events to handle your UI. | ||
|
||
* StartSearchEvent | ||
* DeviceFoundEvent | ||
* DeviceSearchCompleteEvent | ||
* ConnectingStarted | ||
* OnStylusReady | ||
* ConnectionTimeoutEvent | ||
|
||
...just to name a few. | ||
<br> | ||
|
||
If you don't want the default UI, and want your customized version, just remove the **StylusUI** from your scene. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
Docs/imgs/InteractableStylusAction.png.meta → Docs/imgs/InteractableStylusSelect.png.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.