Exemplo n.º 1
0
    void OnEndEdit(string value)
    {
        if (valueConstraint == null)
        {
            return;
        }
        var sign = Math.Sign(valueConstraint.GetValue());

        valueConstraint.SetValue(sign * value.ToDouble());
        valueConstraint = null;
        input.gameObject.SetActive(false);
    }
Exemplo n.º 2
0
    void OnEndEdit(string value)
    {
        if (valueConstraint == null)
        {
            return;
        }
        var sign = Math.Sign(valueConstraint.GetValue());

        if (sign == 0)
        {
            sign = 1;
        }
        if (shouldPushUndo)
        {
            editor.PushUndo();
        }
        valueConstraint.SetValue(sign * value.ToDouble());
        valueConstraint = null;
        input.gameObject.SetActive(false);
    }