![]() We are now done with the UI part of our Unity bot. :video videos/unity-input-field.mp4 Buttonįinally our Chat UI will now contain a Send Button to send the user message to the bot for processing.Īdjust the button placement as shown below. Add a Input Field to the Canvas UI element and place it below the Scroll View as shown below.To talk to the bot we will need to add a text Input Field which will take the user input and pass to the bot for processing. :video videos/unity-content-text.mp4 Input Field For that text to be visible and aligned within the viewport we will now create a Text prefab. When you type a message to the bot and a response is generated by the bot we will need to save those text values within the Content of the Viewport. We'll do so by adding a Content Size Filter and Vertical Layout Group component. ![]() We'll now change a few configuration of the Content element of the Viewport so that the text that will be added into the viewport content aligns properly. ![]() This will contain the chats between the user and the bot. Let's add a Canvas and then a Scroll View. We will now add a couple of visual elements to create a chat interface within Unity. Your Unity project should now be created and the Unity studio should now be visible as follows:
0 Comments
Leave a Reply. |