ByteClubGames / YumiAndTheYokai

Byte Club Games' first title!
11 stars 5 forks source link

YokaiObjectsBug #141

Open James-Glynn opened 5 years ago

James-Glynn commented 5 years ago

There is currently a GameObject in the game called the Visibility Controller (you can find it inside of the Scene Director GameObject in most scenes). On the visibility controller, there is a script of the same name that will make any game object you assign to the script invisible unless the Yokai is active/ spawned.

The problem is, if we forget to populate the variable field on that script with a GameObject, there will be an UnassignedReferenceException error that prevents the Yokai from being able to move. I would like you to fix this so that regardless of weather or not the variable is assigned, the script will not throw any game breaking errors.

The other part of your task is to adjust the method that is currently being used to turn the objects invisible. Right now, the code is toggling Object.SetActive(true/false) to make the objects invisible. This is bad, because if there was a script running on that object, it would be deactivated when the object turns invisible. Instead, I want you to deactivate the Mesh Renderer on the GameObjects to turn them invisible.