#help with vr

1 messages · Page 1 of 1 (latest)

errant tartan
#

id appreciate someone coming to help me out with this

pliant gazelle
#

m_Camera and Camera GameObject sound like different variables.

#

Try debugging them and add them as the second parameter of the debug. Then you can click on the message to get the object selected in the hierarchy.

errant tartan
#

i debugged it and it definitely has a reference to the right gameobject

#

i looked at the reference and under base.base.gameObject [Components] the trackedbasedriver is there

errant tartan
#

its part of the XRI package

pliant gazelle
#

What's the script that this code is from then? is it not XROrigin?

errant tartan
#

that code is from xrorigin

#

xr origin is part of XRI

pliant gazelle
#

Ok. can you share the whole if block of if (m_Camera)

#

Maybe the preprocessor directive INCLUDE_INPUT_SYSTEM is false.

errant tartan
#
           if (m_Camera)
            {
#if INCLUDE_INPUT_SYSTEM
                var trackedPoseDriver = m_Camera.GetComponent<TrackedPoseDriver>();
                if (trackedPoseDriver == null)
                {
                    Debug.LogWarning(
                        $"Camera \"{m_Camera.name}\" does not use a Tracked Pose Driver, " +
                        "so its transform will not be updated by an XR device.  In order for this to be " +
                        "updated, please add a Tracked Pose Driver.", this);
                }
#else
                    Debug.LogWarning(
                        $"Camera \"{m_Camera.name}\" does not use a Tracked Pose Driver and com.unity.inputsystem is not installed, " +
                        "so its transform will not be updated by an XR device.  In order for this to be " +
                        "updated, please install com.unity.inputsystem and add a Tracked Pose Driver.", this);
#endif
            }
#

this runs in Awake() btw

#

at the end of the method

pliant gazelle
#

Is that component added at runtime?

errant tartan
#

the pose driver?

pliant gazelle
#

yes

errant tartan
#

i have it added as part of the scene

pliant gazelle
#

hmm

errant tartan
#

i dont think its supposed to be

pliant gazelle
#

Then I've no clue. Unless it's destroyed on the same frame or something.

errant tartan
#

holup

#

fuuuuuuuck that

pliant gazelle
#

Ah, so there are several.

errant tartan
#

thanks for your help

pliant gazelle
#

But if the input system one inherits from the regular one, it should be fine

errant tartan
#

no warning now