The first thing i done in Unity was print hello world in the Unity console by using print("Hello world")
To start making an adding object in Unity i added 2 input fields, a button and a text object. Changed the buttons text to Add and then created a new script and put it on an empty i opened the script to edit it and started by creating some public classes for the input01&02 and one for the text output i then created a function for adding both of the input fields to make sure that the function used the numerical values i put .text after the input01. and then used a string to output on the text output. When i click play in Unity and put in two values they were successfully added together.
Commentaires