๊ฐ์ฅ ์ต๊ทผ ์ง๋ฌธ๊ธ์
๋ฌผ๋ก ์ ๊ฒ๋ ์ดํด๊ฐ ์ข ๊ฑธ๋ ค์ ์์ง ํด๊ฒฐ๋ก ์๋ฐ๊ฟ
----
์คํฌ๋กค ๋ฐ๋ก ํด์๋ ์กฐ์ ํ๋ ๊ธฐ๋ฅ์ ๋ง๋ค์๋๋ฐ ์คํฌ๋กค ๋ฐ ์์ ๋ด์ฉ์ด ๊ณ์ ๋ฐ๋ณต๋ผ์ ๋์ด์ง ์ฝ๋๋public TMP_Dropdown resolutionDropDown;ย ย Resolution[] resolutions;ย ย void Start()ย ย {ย ย ย ย resolutions = Screen.resolutions;ย ย ย ย resolutionDropDown.ClearOptions();ย ย ย ย List<string> options = new List<string>();ย ย ย ย int curResolutionIndex = 0;ย ย ย ย for (int i = 0; i<resolutions.Length; i++)ย ย ย ย {ย ย ย ย ย ย string option = resolutions[i].width + "X" + resolutions[i].height;ย ย ย ย ย ย options.Add(option);
ย ย ย ย ย ย if(resolutions[i].width == Screen.currentResolution.width &&ย ย ย ย ย ย ย ย ย resolutions[i].height == Screen.currentResolution.height)ย ย ย ย ย ย {ย ย ย ย ย ย ย ย curResolutionIndex = i;ย ย ย ย ย ย }ย ย ย ย }ย ย ย ย resolutionDropDown.AddOptions(options);ย ย ย ย resolutionDropDown.value = curResolutionIndex;ย ย ย ย resolutionDropDown.RefreshShownValue();
public void SetResolutions(int resolutionIndex)ย ย {ย ย ย ย Resolution resolution = resolutions[resolutionIndex];ย ย ย ย Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen) ;ย ย }
์ด๋ ๊ฒ ์งฐ๊ณ ์๋ํฐ์์ ๋ณด๋ฉด ์ ์์ ์ผ๋ก ํ๋์ฉ ๋ ธ์ถ๋๋๋ฐย ํ์ผ์ ๋น๋ํด์ ๋ณด๋ฉด ๊ฐ์ ๋ฉ๋ด๊ฐ ๋ช๊ฐ์ฉ ์ค๋ณต๋จ640 * 480 ์ด ๋ง 7๊ฐ ์ ๋ ์๊ณ 800 * 600์ด ๋ง 3๊ฐ ์ ๋ ์๊ณ ย ์ด๋ฐ์์ผ๋กย
์ด๊ฑธ ์๋ํฐ์ฒ๋ผ ํ๋์ฉ๋ง ๋ณด์ด๊ฒ ํ๋ ค๋ฉด ๋ฌด์จ ์ต์ ๊ฑด๋๋ ค์ผํจ?
์ง์ธํ๊ฐ ๋ญ๋ฐ
์ง๋ฌธ ์๋ฃ๋๋ฉด ์ญ์ ํ๊ณ ํ๋ ์ ๋ค ์๋ค๊ธธ๋ ๋๋ ์๊ทธ๋ฌ๋๊ฑฐ๋ณด์ฌ์ฃผ๋ ค๊ณ
๊ฐ์ ํด์๋์์ ๋ฆฌํ๋ ์ ๋ ์ดํธ๊ฐ ๋ค๋ฅธ๊ฒ ํ์๋๋ ๊ฒ ์๋๊น?
ํน์ ๊ทธ๊ฑด ์ด๋ป๊ฒ ์กฐ์ ํด์ผํ๋์ง ๊ฐ๋ฅด์ณ์ค ์ ์์?