Search Unity

SteamVR - Quickstart: Expand Camera not working

Discussion in 'AR/VR (XR) Discussion' started by Kaibear, Oct 21, 2016.

  1. Kaibear

    Kaibear

    Joined:
    Oct 21, 2016
    Posts:
    4
    Hi guys,

    I started developing in Unity and downloaded the SteamVR asset and tried to follow the quickstart sheet, Valve provided within the asset.

    But whenever I add the SteamVR_Camera script to my Main_Cameraobject and hit "Expand" (as suggested by the quickstart), the Main_Cameraitself won't be replaced by the 3 parts hierarchy (Main_Camera/Main_Camera(Origin)/Main_Camera(Head)).
    Instead it creates the bulk "Main_Camera(Origin)/Main_Camera(Head)" while Main_Camera is a separate object on the same hierarchy level. This obviously wrong setup also leads to an error:

    MissingComponentException: There is no 'Camera' attached to the "Main Camera (head)" game object, but a script is trying to access it.
    You probably need to add a Camera to the game object "Main Camera (head)". Or your script needs to check if the component is attached before using it.
    SteamVR_Camera.Expand () (at Assets/SteamVR/Scripts/SteamVR_Camera.cs:185)
    SteamVR_Editor.OnInspectorGUI () (at Assets/SteamVR/Editor/SteamVR_Editor.cs:74)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
    UnityEditor.DockArea:OnGUI()

    Adding the new bulk manually to the Main_Camera does not work either to fix it. In addition further object information (which maybe are inherited) are missing in the bulk-objects.

    Here are some screenshots of that:

    http://imgur.com/a/2gYAP

    In addition SteamVR_CameraFlip is not loading, as it's to old (is it obsolote?):

    SteamVR_CameraFlip is deprecated in Unity 5.4 - REMOVING
    UnityEngine.Debug:Log(Object)
    SteamVR_CameraFlip:Awake() (at Assets/SteamVR/Scripts/SteamVR_CameraFlip.cs:14)
    UnityEditor.HostView:OnGUI()

    Using Unity 5.4.1. and wanted to ask this question in Unity Answers, but for some reason I can't insert topics as my topic selection is always empty even using every character given in latin languages.
     
  2. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    Have you tried just using the [CameraRig] prefab instead? That worked for me, but in 5.3.4.
     
    Kaibear likes this.
  3. Kaibear

    Kaibear

    Joined:
    Oct 21, 2016
    Posts:
    4
    Haven't tried it before. But now it's working fine! Thanks for that, wasn't seeing any prefabs for instant usage...