Search Unity

FOR help ,SteamVR 2.5.0

Discussion in 'VR' started by giantaxess, Dec 27, 2019.

  1. giantaxess

    giantaxess

    Joined:
    Dec 27, 2019
    Posts:
    1
    Hi,I've recently started using Unity so please forgive my lack of knowledge.
    In unity2018.3.7 ,I import SteamVR 2.5.0,but miss two error as follows:
    Assets\SteamVR\Scripts\SteamVR_Render.cs(180,40): error CS1061: 'SteamVR_ExternalCamera' does not contain a definition for 'SetupDeviceIndex' and no accessible extension method 'SetupDeviceIndex' accepting a first argument of type 'SteamVR_ExternalCamera' could be found (are you missing a using directive or an assembly reference?)
    Assets\SteamVR\Scripts\SteamVR_Render.cs(207,44): error CS1061: 'SteamVR_ExternalCamera' does not contain a definition for 'SetupPose' and no accessible extension method 'SetupPose' accepting a first argument of type 'SteamVR_ExternalCamera' could be found (are you missing a using directive or an assembly reference?)
    Hope to get everyone's help!
    Thanks!!!
     
    gareth_unity550 and yogstrina like this.
  2. yogstrina

    yogstrina

    Joined:
    Jun 24, 2018
    Posts:
    1
    Hi, I also have this problem. I was using a HTC Vive with Unity 2019.2.17f1 and it worked perfectly.
    But when I setup the project to work with WMR I get the same issues.
    I have the HP VR1000-100nn
    Having already imported SteamVR 2.5.0, I :
    - switched platforms to use UWP
    - activated VR support and added WMR to the list
    - installed the XR Input Legacy Helper from the package manager
    - generated and saved the Steam Inputs using the "default" settings
    Then these errors show up:

    "Assets\SteamVR\Scripts\SteamVR_Render.cs(180,40): error CS1061: 'SteamVR_ExternalCamera' does not contain a definition for 'SetupDeviceIndex' and no accessible extension method 'SetupDeviceIndex' accepting a first argument of type 'SteamVR_ExternalCamera' could be found (are you missing a using directive or an assembly reference?)"
    "Assets\SteamVR\Scripts\SteamVR_Render.cs(207,44): error CS1061: 'SteamVR_ExternalCamera' does not contain a definition for 'SetupPose' and no accessible extension method 'SetupPose' accepting a first argument of type 'SteamVR_ExternalCamera' could be found (are you missing a using directive or an assembly reference?)"

    I tried to restart Unity, my Laptop, and reimporting SteamVR, but nothing changes.

    I haven't found anyone else with this problem yet, such a relief I'm not the only one.
     
    gareth_unity550 likes this.
  3. ypvypv_unity

    ypvypv_unity

    Joined:
    Mar 1, 2020
    Posts:
    1
    I wrapped calls to both SteamVR_ExternalCamera.SetupPose and SteamVR_ExternalCamera.SetupDeviceIndex with

    #if !UNITY_WSA
    externalCamera.SetupPose(cameraPose, cameraSource);
    #endif

    It appears to work correctly. If you look at the implementation of those methods in ExternalCamera source, you will see that the methods are already removed from UNITY_METRO aka UNITY_WSA.