Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Stop rendering existing planes in AR Foundation / XR Interaction Toolkit on object placement

Discussion in 'XR Interaction Toolkit and Input' started by Jeffruddick, Mar 11, 2020.

  1. Jeffruddick

    Jeffruddick

    Joined:
    Apr 16, 2018
    Posts:
    2
    I'm working on a project using AR Foundation / XR Interaction Toolkit and I'm trying to disable the rendering of existing planes once I place an object in the scene. Per the documentation, I have tried to deploy the code below. I tried creating a method in a separate script and then connect this script to one of the XRBase Interactor events. I can't seem to get this to work. Is this the best process to disable the visualization? Any suggestions to get this working?


    Code (CSharp):
    1. foreach (var plane in planeManager.trackables)
    2. {
    3.     plane.gameObject.SetActive(false);
    4. }
     
  2. nicolasfischoeder

    nicolasfischoeder

    Joined:
    Nov 7, 2018
    Posts:
    6
    I am facing the same issue. Does anybody have a solution?
     
  3. deac0n

    deac0n

    Joined:
    Apr 19, 2019
    Posts:
    2
    also searching...
    seems that neither ARSessionOrigin, ARPlaneManager, ARPlane or ARPlaneMeshVisualizer are editable. Maybe accessing them via PlaceOnPlane.cs is possible... tbc
     
  4. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    226