-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Some single-value types support storing smaller values depending on the required bits of the input, for getting those values, we support the following by hinting to the internal Get method what our max bits are:
/// <summary>
/// Gets or Sets the number of uv layers within this mesh.
/// </summary>
public int UVLayerCount { get => (int)GetFirstInteger("ul", 0, 32); set => AddValue("ul", (uint)value); }
/// <summary>
/// Gets or Sets the number of color layers within this mesh.
/// </summary>
public int ColorLayerCount { get => (int)GetFirstInteger("cl", 0, 32); set => AddValue("cl", (uint)value); }
/// <summary>
/// Gets or Sets the max number of weight influences within this mesh.
/// </summary>
public int MaximumWeightInfluence { get => (int)GetFirstInteger("mi", 0, 32); set => AddValue("mi", (uint)value); }The problem comes when we set the value, we are now forcing the wider type, when the internal AddValue should support using byte or short if the value can fit into those.
Not a huge priority right now as regardless of what type we write, it should be supported, but tracking regardless for addressing or documenting this behavior.
Metadata
Metadata
Assignees
Labels
No labels