Hi guys…
First of all, i’m Brazilian and i’m sorry about my bad english…
I am creating a PopUp Menu that shows all the resolutions supported by the monitor… To do this, i created a List of Resolution called resolutions and added the items after the foreach (Resolution res in resolutions)…
Ok… Now i need to convert these resolutions to a string and add these string in other List of string… I can’t add these items of the List because the other List is List, and when i put the .toString(), the console doesn’t show the resolutions for me… The console shows me this (UnityEngine.Resolution)…
My code:
private UIPopupList uiPopUpScript;
public List<Resolution> resolutionsList;
// Use this for initialization
void Start() {
uiPopUpScript = GetComponent<UIPopupList>();
resolutionsList = new List<Resolution>();
Resolution[] resolutions = Screen.resolutions;
foreach (Resolution res in resolutions) {
resolutionsList.Add(res);
}
uiPopUpScript.item = resolutionsList.ToString(); // This uiPopUpScript.item is the List of string that i need to put all the resolutions... But this way, the console shows me this:
[UnityEngine.Resolution][1]
[1]: http://i61.tinypic.com/2hcpwt2_th.png
}