// ╔════════════════════════════════════════════════════════════════╗ // ║ 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 to be displayed in runtime settings UI. /// Allows players to adjust vehicle parameters during gameplay. /// [AttributeUsage(AttributeTargets.Field)] public partial class ShowInSettings : Attribute { /// /// Maximum value for the setting slider. /// public float max = 1f; /// /// Minimum value for the setting slider. /// public float min; /// /// Display name for the setting in the UI. /// public string name; /// /// Increment step for the slider. Smaller values allow finer adjustment. /// public float step = 0.1f; /// /// Creates a settings attribute with a custom display name. /// public ShowInSettings(string name) { this.name = name; } /// /// Creates a settings attribute with specified min, max, and step values. /// public ShowInSettings(float min, float max, float step = 0.1f) { this.min = min; this.max = max; this.step = step; } /// /// Creates a settings attribute with custom name and value constraints. /// public ShowInSettings(string name, float min, float max, float step = 0.1f) { this.name = name; this.min = min; this.max = max; this.step = step; } public ShowInSettings() { } } }