Unity
unity WebGL 빌드 후, Mac에서만 느릴경우 해결
기억해조
2023. 10. 26. 12:41
Html파일에서 추가하기
window.devicePixelRatio = 1;
위치)
var script = document.createElement("script");
var myGameInstance = null;
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
window.devicePixelRatio = 1;//이것!...
myGameInstance = unityInstance;
loadingBar.style.display = "none";
}).catch((message) => {
alert(message);
});
};
출처
https://stackoverflow.com/questions/63749024/unity-webgl-performance-issues-on-retina-macbook
https://forum.unity.com/threads/webgl-retina-scaling.853144/