Using value converters in Unity?
I'm trying to create a float scaler which takes in a float value and multiplies it by a number of my choosing in xaml.
I've tried setting up the following converter:
Which I've added to the blend project but because noesis is not referenced in the assembly it doesn't work, I'm not sure there is a noesis dll I could add to the blend project at all?
I've tried setting up the following converter:
Code: Select all
using Noesis;
using System.Globalization;
namespace GameUI
{
//[ValueConversion(typeof(DateTime), typeof(String))]
public class FloatScalerConverter : BaseValueConverter
{
public object Convert(object value, System.Type targetType, object parameter)
{
return (float)value * (float)parameter;
}
public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture)
{
return (float)value / (float)parameter;
}
}
}
Re: Using value converters in Unity?
Hi,
I am sorry to say that for now Converters are only available in C++, not Unity (C#). If this is important to you, please, file us a ticket to tracks this.
Thanks!
I am sorry to say that for now Converters are only available in C++, not Unity (C#). If this is important to you, please, file us a ticket to tracks this.
Thanks!
Who is online
Users browsing this forum: Bing [Bot] and 7 guests