游戏引擎最佳实践
Learn best practices for integrating specific game engines with Multiplay Hosting.
阅读时间1 分钟最后更新于 15 天前
在使用特定游戏引擎时,请参阅以下指南来充分利用 Multiplay Hosting。
在 Unity 中设置目标帧率
要避免您的服务器占用 100% 的 CPU 算力,建议为 Unity 服务器设置目标帧率。 要设置目标帧率,请将以下代码添加到服务器版本中: C#using System.Collections;using System.Collections.Generic;using UnityEngine;public class TargetFPS : MonoBehaviour{ public int target = 60; void Awake() { QualitySettings.vSyncCount = 0; Application.targetFrameRate = target; }}