Search Unity

[XR Interaction Toolkit] Object deletion

Discussion in 'XR Interaction Toolkit and Input' started by d4n3x, Jan 16, 2020.

  1. d4n3x

    d4n3x

    Joined:
    Jan 23, 2019
    Posts:
    24
    Dear Community,

    I have experienced some trouble when deleting an AR object with the new SelectionInteractable - Script on it placed in the scene. Is this an expected behavior? Or has somebody managed to delete such placed prefabs without bricking the scene?

    The main problem with this after placing and only hiding the objects instead of destroying them the scene will slow down fast.

    I would appreciate any help in this matter.

    Greets,
    Dan
     
  2. StayTalm_Unity

    StayTalm_Unity

    Unity Technologies

    Joined:
    May 3, 2017
    Posts:
    182
    Hello,
    This was pointed out to us and is in our backlog. Some of our classes don't actually clean up all their references and registrations, and I need to do a pass on that in the very near future.

    Sorry for the hassle.
     
    d4n3x likes this.
  3. d4n3x

    d4n3x

    Joined:
    Jan 23, 2019
    Posts:
    24
    Thank you for this information. This seems like a major bug for an AR - App.

    When can we expect a fix here? Or a practicable workaround? :)

    Greets Danex
     
  4. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    Its not in the first batch of things we've fixed (which will be out soon). Hopefully in the next set!
     
    d4n3x likes this.
  5. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    ROBYER1 likes this.
  6. d4n3x

    d4n3x

    Joined:
    Jan 23, 2019
    Posts:
    24
    It is my issue - so just saw it. Thank you ;-)
     
  7. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Yeah, and I am soraryu on GitHub, just thought I'd point it out here as well :)
     
  8. d4n3x

    d4n3x

    Joined:
    Jan 23, 2019
    Posts:
    24
    Awesome thanks - maybe there is such a workaround for the non blocking GUI as well when AR Raycasting as well :)
     
  9. scrant

    scrant

    Joined:
    Jun 1, 2017
    Posts:
    73
    Has this been fixed?! I have the latest Unity 2019.3 and XRToolkit 0.9.3 and anytime I delete an object than has some Interactable components on it it bricks the scene and nothing works anymore. This is a blocker. Am I missing something? Thanks much.
     
  10. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    roslim and Matt_D_work like this.
  11. scrant

    scrant

    Joined:
    Jun 1, 2017
    Posts:
    73
    fherbst likes this.
  12. roslim

    roslim

    Joined:
    Dec 1, 2021
    Posts:
    4
    Hi,
    could you please show me your deletion objects part of codings?. i have already had selection, rotation, and scaling function. but i havent found out the coding for deleting objects. already browsed the almost entire youtube and google still not yet found the solution..
     
  13. roslim

    roslim

    Joined:
    Dec 1, 2021
    Posts:
    4
    Hi,
    could you please show me your deletion objects part of codings?. i have already had selection, rotation, and scaling function. but i havent found out the coding for deleting objects. already browsed the almost entire youtube and google still not yet found the solution..
     
  14. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    277
    Hey @roslim,
    The error behavior from the original thread when deleting objects should be properly handled now. XRI is cleaning up any of the references under the hood that were causing problems before. You will need to update to a newer version of the XRI Toolkit to take advantage of these fixes (currently at 2.1.0-pre.1).

    In terms of deleting the object, you can just use the standard Unity convention:
    gameObject.Destroy()
    . Let us know if you have any other questions.
     
    roslim likes this.
  15. roslim

    roslim

    Joined:
    Dec 1, 2021
    Posts:
    4
    sorry for my fool question, i am very new to this.
    i dont get what you mean. i just followed some tutorials on youtube, how to spawning objects and then using xr interaction to select, rotate, and scale object, and those scripts which related already provided by xr interaction toolkit right?. my problem is i dont understand how to make selection on spawned object in order to delete the object by clicking the delete button i created, as it is not included in video. thank you
     
    a189310 likes this.