private void AddFloatItem(string category, string itemName, string variableName, string floatValue, string minValue, string maxValue, string stepValue) { float value = Convert.ToSingle(floatValue); float min = Convert.ToSingle(minValue); float max = Convert.ToSingle(maxValue); float step = Convert.ToSingle(stepValue); Inspector.FloatItem floatItem = new Inspector.FloatItem(category, itemName, variableName, value, min, max, step); floatItem.ValueChanged += FloatItem_ValueChanged; inspectorComponent.ItemAdd(floatItem); }
private void FloatItem_ValueChanged(object sender, float value) { Inspector.FloatItem floatItem = sender as Inspector.FloatItem; m_ModifyDelegate?.Invoke(floatItem.VariableName, floatItem.ValueString); }