Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

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