Game Development Reference
In-Depth Information
Making video configurations
One of the first aspects of the game that we will be editing is the video configuration.
When it comes to performance, the video settings are perhaps the most important.
Changing something as simple as the shadows can greatly change how a player can
smoothly play the game. So let's get started by creating a new C# script and naming
it Video_Config .
Setting the values
Our first step in creating video configurations is to create a function that will set a de-
fault value for the video settings. For this, we will set the video settings to moderate
values that aren't too low or too high. This will give the player a good idea of what they
need to modify if they need or want to modify anything:
public void SetDefaults()
{
SetSettings("Medium");
ToggleShadows(1);
SetFOV(90.00f);
SetResolution(0, 1);
SetAA(2);
SetVsync(1);
}
What this function does is call all of the functions that we create, which will configure
the video settings. The values that we send to each of the functions are default set-
tings that aren't too high or too low.
Toggling the shadows
The first video settings that will be affected are the shadows and how they render. In
Unity, there are three shadow settings: None , Hard , and Soft . For our game, we'll just
use the None and Hard settings. When we set the shadows to None , the shadows
will no longer be rendered. When the shadows are set to Hard , the shadows will have
a hard edge to them; they won't have a fading edge. In the next screenshot, you will
Search WWH ::




Custom Search