Adding Actions to the Button Bar
The Accessibility Touchstick (accessibilitytouchstick1) provides five configurable buttons which can also be hidden, moved, and coloured, independantly of the touchstick itself. This Tutorial will explain step by step how to acheive this.‌
  1. 1.
    Locate the Accessibility Touchstick 1 prefab and add it to the Games Creator/Preferences panel. This will add the Accessibility TouchStick to Game Creator and replace the default one.
​‌
2. You can now use the Accessibilty Actions to Show, Hide, Move, Colour the Prefab. If you are building for Mobile, the TouchStick will automatically display on the screen. However, to see the Touchstick in the Editor or a PC/Mac build, you must trigger the Show TouchStick Action.​‌
3. Press play in the editor and you should be able to drag the touchstick to move the player. One of the features of this asset is that a small drag will walk the player, drag further and the player will run.​‌
4. Next you can add the button bar. However, first you must locate the ButtonsBarActions Prefab from the Accessibility/Prefab folder, and drag to the the scene Hierarchy. Do not rename this prefab, it needs to be ButtonBarActions or the Actions will not find it.​‌
5. Now we need some Actions that the button bar will execute. You can create from 1 to 5 Actions for the 5 buttons. Each Action can contain several Actions and even execute a Trigger. We suggest that you give the Actions meaningful names within the hierarchy.​​‌
6. Now you need to assign these Actions to the Button Bar by adding them to the ButtonBarActions prefab that you added to your scene hierarchy.If you click on the ButtonBarActions in the hierachcy, you will see the follow panel in the inspector. You do not need to open the prefab, just add your Actions to the corresponding button slots. You also must click the enable check box for each button that you want active.​‌
7. I have adding three Actions to buttons A, C, and E. Now we need to show the buttons and position them. For this we can use the Move and Show Button bar Actions. They can be added to the same Trigger/Actions as the Show TouchStick. You can display all of the Buttons, or only those that you have configured.
8. Test your Actions by pressing play. Note that the camera may still rotate when using the editor, but this will not happen when using a touch screen.​‌
9. The Touchstick and the Button bar can be resized to suit your needs. We suggest that you test on the device you are targeting (mobile, tablet, etc) as screen resolution affects the graphic size. The colour can also only be changed after the touchstick is showing. This will be changed in a future release.​‌
10. Your end result should look like this. In future releases, we will allow the individual buttons to be moved to different positions on the screen.​
In the next Tutorial, we will show you how to change the graphics of the touchstick base and stick, and the images of the buttons.
Last modified 1yr ago
Copy link