Search Unity

Bug Scene drag and drop leaving objects with HideInHierarchy flag.

Discussion in 'UI Toolkit' started by yigitcanoksz, Oct 8, 2021.

  1. yigitcanoksz

    yigitcanoksz

    Joined:
    Feb 9, 2021
    Posts:
    4
    Hello,

    I have a custom tool that uses an overlay as a settings window. There are some object fields on overlay for assigning objects from both hierarchy and project windows.

    When I perform drag and drop operation on a prefab from project window to one of the objects fields on the overlay, object on the scene that used as a preview for dragged prefab is not being cleared.

    My overlay looks like this.
    image_2021-10-08_152719.png

    And my scene looks like this after assigning object with drag and drop operation.
    image_2021-10-08_152819.png

    I am using Unity 2021.2.0b13.
     
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    698
    Hello, I'm not sure I understand the question or what I'm seeing in the images. Do you mean that the prefab is also added to the scene?
     
  3. yigitcanoksz

    yigitcanoksz

    Joined:
    Feb 9, 2021
    Posts:
    4
    Hello, yes prefabs are also added to the scene and they are not visible on hierarchy.
     
    Last edited: Oct 15, 2021
  4. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    698
    What do you mean by "they are not visible on inspector"?
     
  5. yigitcanoksz

    yigitcanoksz

    Joined:
    Feb 9, 2021
    Posts:
    4
    By Inspector I meant hierarchy. Sorry about my bad explanation.

    Problem is when I make a drag and drop operation from project window to overlay field on scene, object that created for display preview of the dragged prefab also stays on scene with HideInHierarchy flag. Preview prefab should be cleared when I perform my drop on an overlay.
     
  6. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    698
    I think you found a bug! Can you submit a report with a simple project? You don't even have do drag to your overlay, I dragged a prefab to one of the existing scene overlays and looks like some preview of my prefab is also stuck in the scene and not showing on the hierarchy.

    If you submit it, it'll make the rounds to the proper QA channels and be assigned to the correct team to address it, plus you'll get notified of status updates :cool:

    Thanks in advance!
     
  7. yigitcanoksz

    yigitcanoksz

    Joined:
    Feb 9, 2021
    Posts:
    4
    I created the bug report. Thank you for your interest in the subject and your patience with my bad explanation.