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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Make Main Camera root of hierarchy?

Discussion in 'Editor & General Support' started by Haitiangamer, Feb 26, 2023.

  1. Haitiangamer

    Haitiangamer

    Joined:
    Aug 2, 2018
    Posts:
    2
    I need some help, I'm trying to create convert main camera to XR rig, but I've been coming across this error

    "Your Main Camera is not at the root of your hierarchy. We are unable to automatically convert your scene. Please see the documentation on how to upgrade your scene.
    UnityEditor.GenericMenu:CatchMenu (object,string[],int)"

    I've looked everywhere for an explanation with no success. Can someone help me?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,799
    Is your main camera the child of another object in the scene?
     
  3. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,519
    Note the difference between your title and the error message.

    The error is not asking for the camera to be the root, i.e. have everything else as a child of it. It is asking for the main camera to be at the root, i.e. it is not a child of anything else, but there can still be other root level objects in the scene.

    It's general computer science terminology. A "root" is something which does not have any parents. From there, I strongly recommend reading all of this section of the manual, but specifically the Scene and GameObject sub-sections.
     
    NitricAcid_D, Ryiah and DragonCoder like this.
  4. Haitiangamer

    Haitiangamer

    Joined:
    Aug 2, 2018
    Posts:
    2
    Yes, I placed the main camera as the child of the an empty game object.
     
  5. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,492
    Yeah.. Do not do that. The error literally states to not do that :p
    Sorry if I'm snarky; it's late here, lol.
     
    Ryiah likes this.
  6. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,799
    That is literally the opposite of what you're supposed to do.
     
  7. estoyfrito

    estoyfrito

    Joined:
    May 26, 2018
    Posts:
    5
    I'm having the same problem, as the main camara is childed to the player from google cardboard, which is childed to a capsule that has all the movement and rigid bodies etc. How can I make it root if it's it needs to be attached to the capsule?