Objective: To add C# scripts to record data
In the previous article, I went over the navigation between each screen using On Click Enter events. In this article, I will go over the use of an Interface method to process the data.
We can start with a new C# script called IPanel. The interface has one method that must be implemented in each script;
Next, create a script for each panel, and add the ProcessInfo() method to each script, and add each script to the panel game objects.
To fill out the Search Panel, we need a reference to the InputField object. On the search button, we can also add the ProcessInfo() method to the On Click Enter event.
This panel presents the results of the search, so we need a variable to store all the info.
We can update the script with a text variable, and drag the text variable to the Inspector.
Client Info Panel
Now to update the Client Info Panel, we need three variables. One text variable for the case number, and two Input Field variables for the first and last names.
We will also need to add another On Click Event to process the info.
For the location panel, we will ultimately pull the Case Number from a UI Manager, so it doesn’t need its own variable in this script. We do need a raw image variable for the Google Map, and the Notes Input Field under the map.
Take Photo Panel
For the Take Photo Panel, we need a variable for the raw image photo, and the Notes Input Field.
Last panel is the Overview panel, which is the summary of all the previous information.
Thank you for your time!
In the next article, I will go over setting up the Case script and the UI Manager.