// ╔════════════════════════════════════════════════════════════════╗ // ║ Copyright © 2025 NWH Coding d.o.o. All rights reserved. ║ // ║ Licensed under Unity Asset Store Terms of Service: ║ // ║ https://unity.com/legal/as-terms ║ // ║ Use permitted only in compliance with the License. ║ // ║ Distributed "AS IS", without warranty of any kind. ║ // ╚════════════════════════════════════════════════════════════════╝ #region using System; #endregion namespace NWH.Common.Vehicles { /// /// Attribute that marks a field or property to be displayed in the runtime telemetry UI. /// Used for monitoring vehicle parameters during gameplay and debugging. /// [AttributeUsage(AttributeTargets.All)] public partial class ShowInTelemetry : Attribute { /// /// Minimum value for the field (used for progress bar visualization). /// public float Min { get; set; } = float.NaN; /// /// Maximum value for the field (used for progress bar visualization). /// public float Max { get; set; } = float.NaN; /// /// Format string for displaying the value (e.g., "0.00", "0.0"). /// public string Format { get; set; } = null; /// /// Unit of measurement (e.g., "km/h", "RPM", "N", "°"). /// public string Unit { get; set; } = null; /// /// Display priority. 0 = highest (always visible), 3 = lowest (detailed info). /// public int Priority { get; set; } = 1; /// /// Creates a ShowInTelemetry attribute with optional parameters. /// public ShowInTelemetry(float min = float.NaN, float max = float.NaN, string format = null, string unit = null, int priority = 1) { Min = min; Max = max; Format = format; Unit = unit; Priority = priority; } } }