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.

Bug [SelectBase] doesn't work on non-first objects

Discussion in 'Editor & General Support' started by RadRedPanda, Mar 8, 2023.

  1. RadRedPanda

    RadRedPanda

    Joined:
    May 9, 2018
    Posts:
    1,579
    The SelectionBaseAttribute works fine when you click on the first raycast object, however when you want to click on something behind it, it defaults to its regular behavior. eg.

    upload_2023-3-8_15-53-49.png

    If I click in the Yellow Circle, it selects the Base Mario object correctly, however if I click until it selects the Roy in the background, it selects the sprite.

    This is only slightly annoying because of the Canvas object which exists in the game world, as you can click the canvas first and trying to click through it to the object behind will not select the parent object.

    upload_2023-3-8_15-56-29.png

    Here's me trying to click on the Roy behind the Canvas. You can see the white lines where the bounds of the Canvas are, and trying to select the Roy leads to me selecting the child instead.