Hi there,
Recently, I noticed a sudden frame rate spike in my game. As a quick fix, I used the following script, attached it to a GameObject, and turned it into a prefab for each scene to control the frame rate. I'm wondering if I still need this script when using Adventure Creator, or is there a way to manage the frame rate directly within AC? Any guidance would be greatly appreciated.
using UnityEngine;
public class FrameRateCap : MonoBehaviour
{
// Desired frame rate (e.g., 60 FPS)
public int targetFrameRate = 60;
void Start()
{
// Cap the frame rate
Application.targetFrameRate = targetFrameRate;
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Use Unity's Profiler, with Deep Profile enabled, to get to the source of any framerate spikes.
General Unity optimisation/performance tips can be found on Unity's own site / Google, but AC-related tips can be found in the Manual's "Performance and optimisation" chapter.
Thank you so much! I'll look into it.