Boat Attack使用了Universal RP的许多新图形功能,可以用于探索 Universal RP 的使用方式和技巧。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

28 行
593 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlatformFramerateLock : MonoBehaviour
{
public int highEndRate = 60;
public int highEndPhysRate = 60;
public int lowEndRate = 30;
public int lowEndPhysRate = 30;
void Start()
{
int rate = 60;
int physRate = 50;
#if UNITY_STANDALONE || UNITY_EDITOR || UNITY_XBOXONE || UNITY_PS4
rate = highEndRate;
physRate = highEndPhysRate;
#else
rate = lowEndRate;
physRate = lowEndPhysRate;
#endif
Time.fixedDeltaTime = 1 / physRate;
Application.targetFrameRate = 1 / rate;
}
}