Search Unity

Question Check if mouse click was handled by ImGUI in regular Update() call?

Discussion in 'Immediate Mode GUI (IMGUI)' started by darthdeus, Aug 17, 2020.

  1. darthdeus

    darthdeus

    Joined:
    Oct 13, 2013
    Posts:
    80
    I have a script attached to the camera which allows the player to move the camera by clicking and dragging anywhere on the screen. I also have a little piece of ImGUI which uses a `
    GUILayout.BeginScrollView()`, but the problem is that dragging the scrollbar in the ScrollView also drags the camera.

    Is there some way I can check in the camera script that ImGUI has already handled the mouse event, so that I can ignore it?