Skip to content

Commit 5958185

Browse files
jamreRene Damm
authored andcommitted
FIX: Add single and double missing from PrimitiveValue.From<TValue> (#1013).
1 parent 154deab commit 5958185

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Packages/com.unity.inputsystem/InputSystem/Utilities/PrimitiveValue.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ public static PrimitiveValue From<TValue>(TValue value)
771771
case TypeCode.UInt16: return new PrimitiveValue(Convert.ToUInt16(value));
772772
case TypeCode.UInt32: return new PrimitiveValue(Convert.ToUInt32(value));
773773
case TypeCode.UInt64: return new PrimitiveValue(Convert.ToUInt64(value));
774+
case TypeCode.Single: return new PrimitiveValue(Convert.ToSingle(value));
775+
case TypeCode.Double: return new PrimitiveValue(Convert.ToDouble(value));
774776
}
775777

776778
throw new ArgumentException(

0 commit comments

Comments
 (0)