viewimage.php?id=2abcdd23dad63db0&no=24b0d769e1d32ca73cec8ffa11d0283137a147df66c0ff0e9ff48d5b5d7c56d25f5bc8d5787432cdcfb719972ea340210ddaad94315f06b785178b7f8de3ee0d275bd87e

์„ค์ • ๋ฉ”๋‰ด ๋งŒ๋“ค์—ˆ๋Š” ์ƒํƒœ์ž„

์ €๊ธฐ์„œ ๊ฐ’์„ ๋ณ€๊ฒฝํ•˜๋ฉด ๋ณ€๊ฒฝ๋œ ๊ฐ’์ด ์ €์žฅ์ด ๋จ.

๊ทธ ํ›„ ๋‹ค๋ฅธ ์”ฌ์œผ๋กœ ๋„˜์–ด๊ฐ”๋‹ค๊ฐ€ ๋‹ค์‹œ ์ด๊ณณ์— ์˜ค๋ฉด ์ง€๊ธˆ ์ € ์ƒํƒœ ์ €๋Œ€๋กœ ๋˜์–ด์žˆ์Œ.

๊ทธ๋ฆฌ๊ณ  ๊ฐ’์„ ์ˆ˜์ •ํ•˜๋ ค๊ณ  ์‚ฌ์ด๋“œ ๋ฐ”๋ฅผ ์›€์ง์ด๊ฑฐ๋‚˜ ํ•˜๋ฉด ๋‹ค์‹œ ์ดˆ๊ธฐ ๊ฐ’์ผ๋•Œ๋กœ ๋Œ์•„๊ฐ€๋ฒ„๋ฆผ

ํ˜น์‹œ ์ด๊ฑด ์–ด๋–ป๊ฒŒ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์„๊นŒ?


์ฝ”๋“œ๋Š” ์ด๋Ÿผ

public class LobbyManager : MonoBehaviour
{
List<Resolution> resolutions = new List<Resolution>();
public Dropdown resolutionDropDown;
public int resolutionNum;
public GameObject mainMenu;
public GameObject settingMenu;
public AudioMixer audioMixer;
public AudioMixer audioMixerEF;
void Start()
{
InitUI();
}
public void ExitButton() // ์ข…๋ฃŒ
{
Application.Quit();
}
public void StartButton()
{
SceneManager.LoadScene("Prologue");
}
public void SetBGSound(float vol)
{
audioMixer.SetFloat("Volume", vol);
}
public void SetEFSound(float vol1)
{
audioMixerEF.SetFloat("Effect", vol1);
}
public void SetFullScreen(bool isfull)
{
Screen.fullScreen = isfull;
}
public void SetResolutions(int resolutionIndex)
{
//Resolution resolution = resolutions[resolutionIndex];
//Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen) ;
}
public void BacktoMainMenu()
{
settingMenu.SetActive(false);
mainMenu.SetActive(true);
}
public void GotoSettingMenu()
{
settingMenu.SetActive(true);
mainMenu.SetActive(false);
}
void InitUI()
{
for(int i = 0; i < Screen.resolutions.Length; i++)
{
if (Screen.resolutions[i].refreshRate == 60 || Screen.resolutions[i].refreshRate == 144)
{
resolutions.Add(Screen.resolutions[i]);
}
}
resolutionDropDown.options.Clear();
int optionNum = 0;
foreach(Resolution item in resolutions)
{
Dropdown.OptionData option = new Dropdown.OptionData();
option.text = item.width + " X " + item.height + "(" + item.refreshRate + ")";
resolutionDropDown.options.Add(option);
if(item.width == Screen.width && item.height == Screen.height)
{
resolutionDropDown.value = optionNum;
}
optionNum++;
}
resolutionDropDown.RefreshShownValue();
}
public void DropBoxOptionChange(int x)
{
resolutionNum = x;
}
}