void Awake() { // Debug.LogWarning("Key = "+MergeCubeCore.developmentKey); if (instance == null) { instance = this; } else if (instance != this) { DestroyImmediate(this); return; } #if !UNITY_EDITOR if (SystemInfo.deviceModel.Contains("iPad") || (Application.platform != RuntimePlatform.IPhonePlayer && DeviceDiagonalSizeInInches() >= 7.5f)) { // Debug.Log("This is a tablet!"); deviceIsTablet = true; } #else deviceIsTablet = false; #endif deviceScreenWidth = Screen.width; deviceScreenHeight = Screen.height; if ((Screen.width == 2436 && Screen.height == 1125) || (Screen.width == 1125 && Screen.height == 2436)) { menuButton.parent.GetComponent <RectTransform>().anchoredPosition = new Vector2(135f, -65f); recordingButton.parent.GetComponent <RectTransform>().anchoredPosition = new Vector2(-135f, -65f); } else { menuButton.parent.GetComponent <RectTransform>().anchoredPosition = new Vector3(90f, -65f); recordingButton.parent.GetComponent <RectTransform>().anchoredPosition = new Vector3(-90f, -65f); } if (Application.isPlaying) { gameObject.AddComponent <MergeCubeScreenRotateManager>(); } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { DestroyImmediate(this); return; } #if !UNITY_EDITOR if (SystemInfo.deviceModel.Contains("iPad") || (Application.platform != RuntimePlatform.IPhonePlayer && DeviceDiagonalSizeInInches() >= 7.5f)) { // Debug.Log("This is a tablet!"); deviceIsTablet = true; } #else deviceIsTablet = false; #endif deviceScreenWidth = Screen.width; deviceScreenHeight = Screen.height; gameObject.AddComponent <MergeCubeScreenRotateManager> (); }