void Awake() { if(instance == null){ //making sure we only initialize one instance. instance = this; GameObject.DontDestroyOnLoad(this.gameObject); } else { //Destroying unused instances. GameObject.Destroy(this); } //FONT if(Mathf.Max(Screen.width, Screen.height) > 640){ //using max to be certain we have the longest side of the screen, even if we are in portrait. fontSuffix = "_2X"; //a nice suffix to show the fonts are twice as big as the original } }
void Awake() { if (instance == null) //making sure we only initialize one instance. { instance = this; GameObject.DontDestroyOnLoad(this.gameObject); } else //Destroying unused instances. { GameObject.Destroy(this); } //FONT if (Mathf.Max(Screen.width, Screen.height) > 640) //using max to be certain we have the longest side of the screen, even if we are in portrait. { fontSuffix = "_2X"; //a nice suffix to show the fonts are twice as big as the original } }
// Use this for initialization void Start() { ExampleWindow.OpenWindow(); }