fix missing reference errors in tooltip

This commit is contained in:
minenice55 2022-06-28 16:09:41 -04:00
parent a53176a1fd
commit 5d62518e3a
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ namespace HeavenStudio.Editor
[SerializeField] public Canvas MainCanvas; [SerializeField] public Canvas MainCanvas;
[SerializeField] public Camera EditorCamera; [SerializeField] public Camera EditorCamera;
[SerializeField] public GameObject EditorLetterbox; // [SerializeField] public GameObject EditorLetterbox;
[SerializeField] public GameObject GameLetterbox; [SerializeField] public GameObject GameLetterbox;
[Header("Rect")] [Header("Rect")]

View file

@ -28,7 +28,7 @@ namespace HeavenStudio.Editor
private void Update() private void Update()
{ {
Vector3 anchoredPosition = Input.mousePosition; Vector3 anchoredPosition = Input.mousePosition;
Camera camera = Camera.main; Camera camera = Editor.instance.EditorCamera;
Vector3 canvasScale = Editor.instance.MainCanvas.transform.localScale; Vector3 canvasScale = Editor.instance.MainCanvas.transform.localScale;
Vector2 scale = new Vector2(canvasScale.x, canvasScale.y); Vector2 scale = new Vector2(canvasScale.x, canvasScale.y);
float toolTipScale = camera.pixelWidth / 1280f; float toolTipScale = camera.pixelWidth / 1280f;