add units support in float, double and Float3 input

This commit is contained in:
nothingTVatYT
2024-01-28 20:52:25 +01:00
parent 1094abce5a
commit 9e38a01acc
13 changed files with 182 additions and 7 deletions

View File

@@ -0,0 +1,35 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
namespace FlaxEngine
{
/// <summary>
/// Used to specify the value category of a numeric value as either as-is (a scalar), a distance (formatted as cm/m/km)
/// or an angle (formatted with a degree sign).
/// </summary>
/// <seealso cref="System.Attribute" />
[Serializable]
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public sealed class ValueCategoryAttribute : Attribute
{
/// <summary>
/// The value category used for formatting.
/// </summary>
public FlaxEditor.Utilities.Utils.ValueCategory Category;
private ValueCategoryAttribute()
{
Category = FlaxEditor.Utilities.Utils.ValueCategory.None;
}
/// <summary>
/// Initializes a new instance of the <see cref="ValueCategoryAttribute"/> class.
/// </summary>
/// <param name="category">The value category.</param>
public ValueCategoryAttribute(FlaxEditor.Utilities.Utils.ValueCategory category)
{
Category = category;
}
}
}