#help with vr
1 messages · Page 1 of 1 (latest)
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.
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
i cant change the code because its immutable
its part of the XRI package
What's the script that this code is from then? is it not XROrigin?
Ok. can you share the whole if block of if (m_Camera)
Maybe the preprocessor directive INCLUDE_INPUT_SYSTEM is false.
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
Is that component added at runtime?
the pose driver?
yes
i have it added as part of the scene
hmm
i dont think its supposed to be
Then I've no clue. Unless it's destroyed on the same frame or something.
could it be because the name of the component on the gameobject is "UnityEngine.SpatialTracking.TrackedPoseDriver"
holup
fuuuuuuuck that
Ah, so there are several.
thanks for your help
But if the input system one inherits from the regular one, it should be fine
no warning now