// Initialize to avoid warnings. private void Start_UCE_Settings() { settingsVariables = FindObjectOfType <UCE_UI_SettingsVariables>().GetComponent <UCE_UI_SettingsVariables>(); horizontal = 0; vertical = 0; vertical = horizontal; horizontal = vertical; }
// Grab UCE_UI_SettingsVariables and the mesh for use later. private void Start() { settingsVariables = FindObjectOfType <UCE_UI_Settings>().GetComponent <UCE_UI_SettingsVariables>(); mesh = GetComponent <MeshRenderer>(); if (mesh != null) { sprite = GetComponent <SpriteRenderer>(); } }
//Loads all of our settings on start. private void Start() { settingsVariables = FindObjectOfType <UCE_UI_SettingsVariables>().GetComponent <UCE_UI_SettingsVariables>(); resolutionDropdown.options.Clear(); resolutions = Screen.resolutions; //Set current resolution to screens resolution. foreach (Resolution resolution in resolutions) //Loop through resolution possibilities in the array. { resolutionDropdown.options.Add(new Dropdown.OptionData(resolution.ToString())); //Populate teh dropdown with the resolution possibilities. } LoadSettings(); }
// Grabs our settings variables. private void Start() { settingsVariables = FindObjectOfType <UCE_UI_SettingsVariables>().GetComponent <UCE_UI_SettingsVariables>(); }