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. Dismiss Notice

List of created Andy's Gameobjects

Discussion in 'AR' started by EchtMe, Feb 4, 2018.

  1. EchtMe

    EchtMe

    Joined:
    Jan 16, 2018
    Posts:
    10
    Hello there.

    I haven't found any solution yet...

    How can I get a list of all created GameObjects (Andy's) in the HelloARcore demo?
    I want to tap on objects and destroy them, if desired.

    Cheers
     
  2. aakashdabrase

    aakashdabrase

    Joined:
    Aug 31, 2017
    Posts:
    3
    Are you able to get tap events on the objects?
     
  3. EchtMe

    EchtMe

    Joined:
    Jan 16, 2018
    Posts:
    10
    Hi, yes this works and I can destroy them. But there must be a way to get a list of all created object handled by the ARcore.
     
  4. Deleted User

    Deleted User

    Guest

    Hello,

    I'd suggest you have a look at the code used in the HelloARCore demo. All you need should be fairly easy to get from there. Notably from the script conveniently named "Hello AR Controller" placed on the "ExampleController" gameobject which holds a reference to the Andy prefab.

    If you need further help, check out the different tutorials on this page : https://unity3d.com/learn/tutorials.

    Cheers
     
  5. aakashdabrase

    aakashdabrase

    Joined:
    Aug 31, 2017
    Posts:
    3
    Just check the HelloARController script attached to ExampleController GameObject, At line no. 132 we are creating a new GameObject "andyObject". All you have to do is create a an array of GameObjects and add "andyObject" to that array and you will get the list.
    Let me know if you need any further help :)