Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding transform name of the tracker for better debug logs #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Runtime/UXF/Scripts/Etc/Tracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public abstract class Tracker : MonoBehaviour
/// <summary>
/// Description of the type of measurement this tracker will perform.
/// </summary>
public abstract string MeasurementDescriptor { get; }
public abstract string MeasurementDescriptor { get; }

/// <summary>
/// Custom column headers for tracked objects.
/// </summary>
public abstract IEnumerable<string> CustomHeader { get; }
public abstract IEnumerable<string> CustomHeader { get; }

/// <summary>
/// A name used when saving the data from this tracker.
/// </summary>
Expand All @@ -44,7 +44,7 @@ public string DataName
public bool Recording { get { return recording; } }

public UXFDataTable Data { get; private set; } = new UXFDataTable();


/// <summary>
/// When the tracker should take measurements.
Expand Down Expand Up @@ -75,8 +75,8 @@ void FixedUpdate()
/// </summary>
public void RecordRow()
{
if (!recording) throw new System.InvalidOperationException("Tracker measurements cannot be taken when not recording!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the empty line changes and force push?

if (!recording) throw new System.InvalidOperationException($"Tracker measurements cannot be taken when not recording! {transform.name}");

UXFDataRow newRow = GetCurrentValues();
newRow.Add(("time", Time.time));
Data.AddCompleteRow(newRow);
Expand Down