Untitled
unknown
plain_text
a year ago
955 B
7
Indexable
Camera.main.orthographicSize = 10; float maxHorizontalSize = gridManager.cols; float maxVerticalSize = gridManager.rows; float panelTopHeight = (panelTop.sizeDelta.y) * canva.scaleFactor; float panelBotHeight = (panelBot.sizeDelta.y) * canva.scaleFactor; float screenWidth = (float)(Screen.width) / CameraExtension.PixelsPerUnit(Camera.main); float screenHeight = (float)(Screen.height - (panelTopHeight + panelBotHeight)) / CameraExtension.PixelsPerUnit(Camera.main); float widthSize = screenWidth / maxHorizontalSize; float heightSize = screenHeight / maxVerticalSize; float cellSize = Mathf.Min(widthSize, heightSize); float size; if (GameManager.Instance.isSceneGame()) { size = 1.6f; } else { size = 2.56f; } float orthographicSize = 10 * (size / cellSize);
Editor is loading...
Leave a Comment