Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Prefab drag size and position

Discussion in '2018.2 Beta' started by sstrong, Jun 18, 2018.

  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    When a prefab is dragged into the scene view, the size and exact screen space location seems to have changed since 2018.1. This has affected the behaviour of one of our editor tools.

    How does Unity 2018.2 determine the size for the prefab (as it is being dragged) and which object is below it? I assume that the object below it determines the size of the prefab preview image as it is dragged in the scene view.
     
  2. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Here is an example in action. The first using U2018.1.0f2, works correctly. The prefab preview is resized correctly as it is dragged over the plane.

    upload_2018-6-19_15-52-16.png
    The second image shows the behaviour with 2018.2.0b8 where the prefab being dragged into the scene is not correctly resized and appears huge.

    upload_2018-6-19_15-55-48.png
     
  3. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Looks like a collider refresh issue / regression. Still there in Beta9.
     
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Hi sstrong,
    Could you please submit a bug report with a reproduction project for this issue and reply in here with the Issue ID? It would help a lot, thanks.
     
  5. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Not sure if we can easily build a repro outside our tool.

    For anyone else who has this issue, a workaround in your editor code, is to disable then re-enable the box collider on the plane / mesh. Another thing that seems to work is to manually update any property of the collider in the Inspector.
     
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    We couldn’t reproduce the issue from the description you gave. It would be really nice to get a repro project of some kind.
     
  7. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,229
    Hmm, yes, we setup a separate project too to try for a repro. We used a bunch of code from our tool, in a cut-down manner. So far no success. However, we can easily repro in our tool (Landscape Builder) and the workaround mentioned above works.
    It seems like an edge case, maybe sometime to do with event timing or refreshing colliders (but we're just guessing). We've tried many other versions U5.4.3p2, 5.6.0p1, 2017.1.0f3, 2018.1.0f1, 2018.1.0f2 which all work fine. Only seems to apply to the 2018.2.0 betas.