Search Unity

Question Any Tips on how to block raycast when UI Document is selected?

Discussion in 'UI Toolkit' started by killerflip, Jan 24, 2023.

  1. killerflip

    killerflip

    Joined:
    May 26, 2022
    Posts:
    11
    Hey there :)

    I am using UI Toolkit and have created a UI with a dark background overlay. When I click on a game object, this UI Document opens up. It's showing kinda like a field book. Problem is, the game object is an NPC, which still walks around in the background, and I can still click it through the background overlay. It's also still showing it's hovering effect. I was googling around, and it looks like that's a real downside using UI toolkit, as there isn't like an easy fix? I wasn't able to wrap my head around on what to do now. Does anyone have any workaround or idea? Thanks a lot!