From 5d62518e3a6a44d74c689b8ba4b187cf035de5d6 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Tue, 28 Jun 2022 16:09:41 -0400 Subject: [PATCH] fix missing reference errors in tooltip --- Assets/Scripts/LevelEditor/Editor.cs | 2 +- Assets/Scripts/LevelEditor/Tooltip.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/LevelEditor/Editor.cs b/Assets/Scripts/LevelEditor/Editor.cs index d999ea07..74c856c4 100644 --- a/Assets/Scripts/LevelEditor/Editor.cs +++ b/Assets/Scripts/LevelEditor/Editor.cs @@ -28,7 +28,7 @@ namespace HeavenStudio.Editor [SerializeField] public Canvas MainCanvas; [SerializeField] public Camera EditorCamera; - [SerializeField] public GameObject EditorLetterbox; + // [SerializeField] public GameObject EditorLetterbox; [SerializeField] public GameObject GameLetterbox; [Header("Rect")] diff --git a/Assets/Scripts/LevelEditor/Tooltip.cs b/Assets/Scripts/LevelEditor/Tooltip.cs index 241e0864..ca15bacc 100644 --- a/Assets/Scripts/LevelEditor/Tooltip.cs +++ b/Assets/Scripts/LevelEditor/Tooltip.cs @@ -28,7 +28,7 @@ namespace HeavenStudio.Editor private void Update() { Vector3 anchoredPosition = Input.mousePosition; - Camera camera = Camera.main; + Camera camera = Editor.instance.EditorCamera; Vector3 canvasScale = Editor.instance.MainCanvas.transform.localScale; Vector2 scale = new Vector2(canvasScale.x, canvasScale.y); float toolTipScale = camera.pixelWidth / 1280f;