Game Development Reference
In-Depth Information
Figure 12-2. Stats displayed in the Unity editor Game View
The Draw Calls stat goes into even more detail, indicating the number of things that the CPU needs
to render. It is important to understand that one game object may be rendered multiple times per
frame for each of the effects applied to it, such as pixel lights, shadows, and reflections. Using less
of these things by applying them only where they make a significant contribution to the look of the
game reduces draw calls, which means less work for the CPU.
You can set the target frame rate using a simple script. In the Project panel, open the Assets ➤
Scripts folder and create a new script named SetTargetFrameRate. Open it in MonoDevelop and edit
the code to the following:
#pragma strict
public var frameRate : int = 50;
function Awake () {
Application.targetFrameRate = frameRate;
}
 
Search WWH ::




Custom Search