This next part of scripting will detail all the basic UI scripts for the game Vendorbus. It is still in development and it is not complete yet.
The basic elements of a resume game, return to menu, UI structure and the basic button interactions in the game. And from the previous version of the game, there are some issues regarding the version of the game itself. Namely this is due to the simple mistake function regarding the AI, as I simply focus too much on Application over Scene Manager, as that function is obsolete to the current version. I made the appropriate changes and making sure everything work out smoothly.
In terms of how I change the script, I used a simple line of code.
“SceneManager.LoadScene(“NameScene”)” – This allows you to change between scenes that Application does the same and it also fixes the problem of it being obsolete.
In addition, you need to also add UnityEngine.SceneManagement in order to make sure that the scene is available for use, otherwise it will just lead to another error.
In other news, I also made a save and load scene using the basics of PlayerPrefs, where you get and set each variable you want to save and save as follows, then apply them into the game later on when the function is called. I still need to make tweaks on it to make it work, but until the basics of character controller and shop manager work the way I wanted it to, it still won’t function at all.
As for shop manager, I have made a simple function of sell and buy, but I need to complete the models and complete the base prerequisites for the other script before I pursue this, as this is something new to me and I don’t know where to approach from there, so it will take time for it to complete.
There are more scripting elements to come and I will keep this updated as much as I can during this project’s development.