INNER CODE UNIT · C#

RangeAttribute

GloriousPtr/ArcGameEngine · Arc-ScriptCore/src/Attributes/Attributes.cs:75

	public class RangeAttribute : Attribute
	{
		internal Vector2 Range;

		/// <summary>
		/// Change the input field to a slider.
		/// Use this attribute to make a number type variable (byte, ubyte, short, ushort, int, uint, long, ulong, float, double) in a script be restricted to a specific range.
		/// </summary>
		/// <param name="min">Min value (inclusive)</param>
		/// <param name="max">Max value (inclusive)</param>
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public RangeAttribute(float min, float max) => Range = new Vector2(min, max);

		/// <summary>
		/// Change the input field to a slider.
		/// Use this attribute to make a number type variable (byte, ubyte, short, ushort, int, uint, long, ulong, float, double) in a script be restricted to a specific range.
		/// </summary>
		/// <param name="min">Min value (inclusive)</param>

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…