Search Unity

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,648
    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.
     
  2. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    519
    Interesting, I have base building block for my levels and using this attribute, most of the time it works but indeed sometime it selects one of the child object and let us move something it should not.
    So +1 on this.