Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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:
    94
    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?