Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to instantiate a GameObject at the plane's position as soon as a valid plane is detected?

Discussion in 'AR' started by US3D, Sep 15, 2023.

  1. US3D

    US3D

    Joined:
    Dec 6, 2019
    Posts:
    6
    Hi,

    I'm currently learning AR app development and I'm using visual scripting (script graph) to program the app. I've run into some difficulties and I'm not sure how to proceed. Specifically, I'm trying to instantiate a GameObject at the plane's position as soon as a valid plane is detected.

    If anyone has experience with AR app development using visual scripting and could offer some guidance or advice, I would greatly appreciate it.

    Thanks in advance!
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    989
    We actually released a sample scene earlier this year that does this! :D

    Here is the general link to our Visual Scripting docs (we recommend using the custom nodes we introduced in AR Foundation 5.1): https://docs.unity3d.com/Packages/c...manual/visual-scripting/visual-scripting.html

    Our Simple AR sample spawns a cube on the surface of a plane based on wherever you touch. Visual Scripting sample implementation is here: https://github.com/Unity-Technologi...ain/Assets/Scenes/VisualScripting/VS_SimpleAR