18 lines
367 B
C#
18 lines
367 B
C#
using UnityEngine;
|
|
public class FPSTarget : MonoBehaviour
|
|
{
|
|
|
|
public int target = 30;
|
|
|
|
void Awake()
|
|
{
|
|
QualitySettings.vSyncCount = 0;
|
|
Application.targetFrameRate = target;
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
if(Application.targetFrameRate != target){
|
|
Application.targetFrameRate = target;}
|
|
}
|
|
} |