0

I am very new to Unity and Hololens development. As part of a small POC, we need to show the object's position (X, Y and Z axis) on the screen.

For example, if the user interacts with a 3D cube and moves it with a hand, the real-time position of the cube should be visible on Slate.

I tried to add slate to my Unity project but even though I tried, I could not change the text on Slate. Is Slate the correct component for this?

Is there any way this can be achieved?

Regard, Mayank Pande

  • By default, there is no Text component in Slate prefab. May I know how do you create the text component? Do you use **MRTK Canvas** and **Text Mesh Pro**? Provide your script snippets of updating text may also help troubleshoot. You can refer to **Demos-Handtracking/HandinteractionExamples** in **Mixed Reality Toolkit Examples** package. – Zuocheng Wang - MSFT Oct 06 '22 at 06:50
  • HI, Actually, I am trying to do something like this: [link](https://ibb.co/tQmGPxK) In the above image, once the user touches a button, the log is captured and displayed on the logging screen. Instead of the log, is there any way I can use the object's real-time position to be displayed on the screen? I am not sure if the slate is the correct object to be used here. – MAYANK PANDE Oct 06 '22 at 10:15
  • A slate could be used for that, it just needs a text element added. The sample mentioned in comment prior shows the a slate for an example to review (Demos-Handtracking/HandinteractionExamples). In that sample, search for SlateUGUI. It uses same approach as you will find in other stack overflow post here too: https://stackoverflow.com/questions/73150363/ui-creation-with-mrtk-usage-of-slate – Nathan - MSFT Oct 06 '22 at 18:27

1 Answers1

0

A slate could be used for that, it just needs a text element added. The sample mentioned in comment prior shows a slate for an example to review (Demos-Handtracking/HandinteractionExamples).

In that sample, search for SlateUGUI. It uses same approach as you will find in other stack overflow post here too: UI creation with MRTK (Usage of Slate)

Nathan - MSFT
  • 331
  • 1
  • 7