My ShootHoops App

Here is a video of my ShootHoops app. I did not strictly follow the instructions:

  • I used a generic script for managing scene changes using SceneManager.LoadScene(string). I pass the name of the scene I want to change to into a public “changeScene” function.
  • I have a GameTimer script/object that calls my changeScene function with the “GameOver” scene name.
  • I found that I prefer updating the UI in my ScoreKeeper and GameTimer scripts (and supplying the UI display objects in the Unity editor), and only updating the UI when the values change rather than putting the scripts in the UI objects and constantly updating in the Update() functions.

I am wondering if there are disadvantages to using the names for the calls to LoadScene instead of using indexes? I find it easier to follow the code when I can see the name of the scene as opposed to a bunch of numbers.

Also, am I doing something inherently evil by updating UI elements via scripts that are attached to other game objects? It seems like it’s less CPU intensive to only update when values change.

3 Likes

Privacy & Terms