From da317bcaff46a0399f793392f18b00df856acf87 Mon Sep 17 00:00:00 2001 From: Akeit0 <90429982+Akeit0@users.noreply.github.com> Date: Sat, 2 Mar 2024 18:24:53 +0900 Subject: [PATCH] Fix: wrong type conversion --- Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs b/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs index 0c69d5c..8e0d9ff 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/GenericField.cs @@ -134,8 +134,8 @@ namespace Alchemy.Editor.Elements control.value = (long)value; control.RegisterValueChangedCallback(x => { - var newValue = (long)Math.Clamp(control.value, 0, long.MaxValue); - OnValueChanged?.Invoke(newValue); + var newValue = Math.Clamp(control.value, 0, long.MaxValue); + OnValueChanged?.Invoke((ulong)newValue); control.value = newValue; });