Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views6 pages

Adding Interactive Buttons and UI Text

The document provides a step-by-step guide for adding interactive buttons and UI text in an AR project, including setting up collision channels, adding sockets to models, and highlighting buttons. It details how to configure button properties, including their order and associated text. Finally, it instructs users to package the project for testing on a device.

Uploaded by

Thang Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

Adding Interactive Buttons and UI Text

The document provides a step-by-step guide for adding interactive buttons and UI text in an AR project, including setting up collision channels, adding sockets to models, and highlighting buttons. It details how to configure button properties, including their order and associated text. Finally, it instructs users to package the project for testing on a device.

Uploaded by

Thang Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Adding interactive buttons and UI text

1. Settings up the collision channels


1.1 If content from the AR toolkit has been migrated to a different project, open your project settings, then
in the Collision section create an Object Channel called UIbutton

Set the default response to ignore.

1.2 If content from the AR toolkit has been migrated to a different project references to these collision
channels may have been lost.

Open up BP_ARPawn and set the TraceChannel and ObjectChannel variables to UIbutton
1.3 Next open up BP_Button and select the widget component

Scroll down to the collision settings and check the Object Type is set to UIbutton and that UIbutton is
set to block on the object responses

2. Adding sockets to your model


2.1 Buttons are created from sockets when the model is loaded into the scene. To add a new button to
your model double click it in the content browser to open the Skeletal/Static mesh browser and add a
new socket
Skeletal mesh editor:
2.2 Name each button “btn” followed by the number starting with 1:

This will ensure it is linked to the correct UI text

2.3 Position your sockets where you want the buttons to spawn

3. Adding your model and button highlighting


3.1 Open BP_Model and make sure your static mesh is added to the scene and connected to the “Add
New Button” function
3.2 If you want to force the user to press the buttons in numerical order leave the variable all buttons
unlocked set to false. If you want to have all buttons unlocked immediately then change the variable
to true.

3.3 To highlight parts of the model when buttons are pressed you must open the model in static/skeletal
mesh editor and add the button name to the Slot Name

Material elements are created in 3d modelling software by adding different materials to sections of
the model.

In BP_Model you will see a section of code that highlights the model when buttons are pressed by
changing the material to an orange glow
4. Adding text for each button

4.1 Next open BP_Widget_UI to enter your text for the buttons.

Go to graph mode:

On the left there are 2 variables called Title Text and Description Text

Edit these variables to change whats displayed for each button

In this example when button 1 is pressed the title will read “Arrow” and the desciption text will read
“This is an arrow”

4.2 To change the text in the button go to BP_widget_button


The button text is currently bound to the button number, if you want to use your own custom symbol
or letter just remove the binding

4.3 Package your project and test on your device

You might also like