From b755cf5005c6d5fbf1c7d1c8f82e996dbff4b222 Mon Sep 17 00:00:00 2001 From: erheine <erheine@nps.edu> Date: Fri, 11 Dec 2020 15:01:22 -0800 Subject: [PATCH] Made the position/rotation logger a little more flexible about the event it logs. --- Event Logger/PositionRotationLogger.cs | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Event Logger/PositionRotationLogger.cs b/Event Logger/PositionRotationLogger.cs index b518fe9..a918455 100644 --- a/Event Logger/PositionRotationLogger.cs +++ b/Event Logger/PositionRotationLogger.cs @@ -5,12 +5,14 @@ namespace Shared.EventLog { public class PositionRotationLogger : IntervalEventLogger { [Tooltip("Transform to log position and rotation for")] public Transform transformToLog; + [Tooltip("The prefix for the event log key for our events")] + public string eventLogKeyPrefix = "Player"; //--------------------------------------------------------------------------- // Add the Transform's position and rotation to the event log protected override void LogEvent() { - eventLog.Add("Player Position", "\"" + transformToLog.position.ToString() + "\""); - eventLog.Add("Player Rotation", "\"" + transformToLog.rotation.eulerAngles.ToString() + "\""); + eventLog.Add($"{eventLogKeyPrefix} Position", "\"" + transformToLog.position.ToString() + "\""); + eventLog.Add($"{eventLogKeyPrefix} Rotation", "\"" + transformToLog.rotation.eulerAngles.ToString() + "\""); } } } diff --git a/package.json b/package.json index b777a4a..5d327c2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.futuretech.shared", "displayName": "FutureTech Shared", "description": "Contains shared items such as the Scriptable Variables.", - "version": "0.1.25", + "version": "0.1.26", "unity": "2019.3", "license": "MIT", "repository": { -- GitLab