Search Unity

How best to change the model attached to Duplicate Ground Plane

Discussion in 'Vuforia' started by muckletone, Feb 23, 2019.

  1. muckletone

    muckletone

    Joined:
    Jan 20, 2019
    Posts:
    4
    Though not new to other more traditional development platforms, i am new to AR. Currently learning/using Unity3D and Vuforia to create a POC for an AR app. I am asking for advise of best practice to accomplish the following user story.
    • Ground Plane Stage set to Duplicate, as i want to add multiple models to the AR view
    • User selects an image button representing a model type
    • The onClick event associated with the model button elects for the selected model to become the active model attached to the Ground Plane
    • User decides to select a different model
    • User selects a button representing the new model type
    • The newly selected model then becomes the current active model associated with the duplicated Ground Plane
    I have identified how to accomplish this if the Ground Plane Stage is NOT set to duplicate. But my goal is to use the "Duplicate" function, so that different models can be placed into the environment during a session. Because a new ground stage is created with each tap (anchoring event), it retains the first model chosen. So, the question is, how would one script access to these subsequent ground plane instantiations in this scenario.

    It would be my guess that the selection of the model type passes its ID to a variable which is read by a script component attached either to the ground plane or AR camera. But there has to be some means to identify the duplicated stage to active the correct model in the duplicated stage.

    To be very clear, i would not expect specific code to be provided, rather, if a more accomplished developer on this forum could suggest the best practice strategy and/or point me to more detailed resources to accomplish this design.

    appreciatively,

    muckeltone