툴/유니티
유니티 프레임 FPS 낮추기, 프레임 FPS 고정
스튜디오 오버그래픽스
2021. 9. 3. 02:55
https://docs.unity3d.com/kr/530/ScriptReference/Application-targetFrameRate.html
Unity - 스크립팅 API: Application.targetFrameRate
The default targetFrameRate is a special value -1, which makes games render at a default frame rate that depends on platform. On standalone platforms, the default frame rate is maximum achievable frame rate. 플렛폼에(platform)에 따라 초당 50-60
docs.unity3d.com
Application.targetFrameRate = 30;
-코드예시-
비교적 간단하고 쉽게 성능을 높이는 방법
보통 설정을 건들지 않으면 60FPS 이상으로 실행되는데
30FPS여도 문제 없는 작업일 경우에 30FPS로 바꿔서 씀
에디터 상에서 잘 적용됐다가도, 빌드해서 실행한 타겟플랫폼에서 적용이 안되는 경우가 있을 수 있음.
타겟플랫폼 문제거나, 기본 프레임관련 설정과 중복되거나 연산 순서의 문제일수 있어서
Invoke를 쓰든 실행하고 좀 1,2초 지나고 적용해주는 방법이 있음.