Exemple #1
0
 void SetResolutions()
 {
     RestoreResolution();
     if (!Application.isEditor)
     {
         resolutions = Screen.resolutions;
         for (int i = resolutions.Length - 1; i >= 0; i--)
         {
             ResButton.Create(this, resToggleGroup, resolutions[i], settingRes);
         }
     }
     else
     {
         MockResolutions();
     }
 }
Exemple #2
0
    void MockResolutions()
    {
        Resolution r = new Resolution();

        r.refreshRate = 60;

        r.width  = 1600;
        r.height = 900;
        ResButton.Create(this, resToggleGroup, r, settingRes);

        r.width  = 1366;
        r.height = 768;
        ResButton.Create(this, resToggleGroup, r, settingRes);

        r.width  = 800;
        r.height = 600;
        ResButton.Create(this, resToggleGroup, r, settingRes);
    }