This is the on demand tutorail where i will simply show how to control object movement on text input. A user will provide text input in order to control an object movement. Lets get started:
- Create a demo scene with a cube and plane.
- Create an input field for user input
- Create a button
- Create a Text Game object for showing error
Scripting
- Create a Script MovementOnText and attach it to your cube. Copy from below, the script is self-explanatory with comments:
- Go to you Cube object and Drag n Drop Cube to your on click event of the button and attached GetInputText Method to it and also Assign input filed into its parameter.
- Lets play and input commands like Move, Back, left, right, up, down
0 Comments