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.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question Need to destroy the object inside of an XR socket interactor

Discussion in 'VR' started by Hacktivist2007, Apr 15, 2022.

  1. Hacktivist2007

    Hacktivist2007

    Joined:
    Dec 29, 2021
    Posts:
    25
    Hello. I am making a crafting system right now, and I need to know how to destroy the object inside of the XR socket Interactor. I have tried methods from the documentation but have received annoying type errors. There is virtually(ha-ha) nothing on the internet about this. Please help me. If you have any questions, tell me. I am using Unity 2021 LTS.
     
  2. Mia_white

    Mia_white

    Joined:
    Apr 15, 2022
    Posts:
    13
    I had the same doubt. with you on this
     
    Hacktivist2007 likes this.
  3. Hacktivist2007

    Hacktivist2007

    Joined:
    Dec 29, 2021
    Posts:
    25
    Thank you. Are you experienced with scripting? I wish Unity could answer me.
     
  4. yuyouwu5

    yuyouwu5

    Joined:
    Aug 14, 2022
    Posts:
    1
    Also wondering the same. Doing the following does not work.
    Code (CSharp):
    1. GameObject.Destroy((UnityEngine.Object)snappedObject);