Search Unity

Question How do I let AR Plane Manager only place one plane instead of multiple?

Discussion in 'AR' started by realmcrafter, Nov 12, 2020.

  1. realmcrafter

    realmcrafter

    Joined:
    Nov 12, 2020
    Posts:
    7
    Hello I am new to Unity & ARFoundation. Did some tutorials to get the basics before I started my own game where you need to swipe a ball and try hit objects on an long plane. The plane, ball and objects are all placed in an GameObject which I called upon in the AR Plane Planager as an Plane Prefab. The problem is whenever I start the game on my phone it will load multiple of these planes while I just need one. Does someone know how I can realize this?

    I have searched in the script for a function that decides how many planes get loaded but I couldn't find anything like that..

     
    Last edited: Nov 12, 2020
  2. ibrahimpenekli

    ibrahimpenekli

    Joined:
    Mar 10, 2015
    Posts:
    31
    Hi @realmcrafter,

    You are doing it wrong. AR Plane Manager generates plane prefab for each detected physical plane in the real world.
    If you want to place your game content in first detected plane, you should register AR Plane Manager plane added event then initialize your game in that plane.

    Good luck!
     
    dani-ria likes this.