Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 58b7c72

Browse files
committed
Allow UI inspect without main camera
1 parent 623dc7b commit 58b7c72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/UI/Inspectors/InspectUnderMouse.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ public static void OnDropdownSelect(int index)
6767
public void StartInspect(MouseInspectMode mode)
6868
{
6969
MainCamera = Camera.main;
70-
if (!MainCamera)
70+
71+
if (!MainCamera && mode == MouseInspectMode.World)
72+
{
73+
ExplorerCore.LogWarning("No MainCamera found! Cannot inspect world!");
7174
return;
75+
}
7276

7377
PanelDragger.ForceEnd();
7478

0 commit comments

Comments
 (0)