Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
mammothlol77's avatar
mammothlol77
Honored Guest
2 years ago

Unity app doesn't track predictions correctly

I have an app that is in Unity that is supposed to track my Predictions(ms) but it just displays zero on my headset. Here is my code below:

csharp
using UnityEngine;
using TMPro;
 
public class GetPredAmount : MonoBehaviour
{
    public TMP_Text textComponent;
 
    void Start()
    {
    }
 
    void Update()
    {
        var metrics = OVRMetricsToolSDK.Instance.GetLatestMetricsSnapshot();
 
        if (metrics != null && metrics.HasValue)
        {
            textComponent.text = metrics.Value.average_prediction_milliseconds.ToString();
 
        }
        else
        {
            textComponent.text = "Metrics not available";
        }
    }
}



I am using the OVR Metrics Tool unity package

No RepliesBe the first to reply