您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

36 行
802 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Simple MonoBehaviour to set the Application's targetFrameRate
/// </summary>
public class SetTargetFramerate : MonoBehaviour
{
[SerializeField]
[Tooltip("Sets the application's target frame rate.")]
int m_TargetFrameRate = 60;
/// <summary>
/// Get or set the application's target frame rate.
/// </summary>
public int targetFrameRate
{
get { return m_TargetFrameRate; }
set
{
m_TargetFrameRate = value;
SetFrameRate();
}
}
void SetFrameRate()
{
Application.targetFrameRate = targetFrameRate;
}
void Start()
{
SetFrameRate();
}
}