title: How do i set int value of inputfield with Content Type set to Integer in Unity?
body: <p>I am working with Unity 2018.
  I have inputfield and 2 buttons.</p>
  
  <p>When i click a button the expected behaviour is for the counter inside the field to change accordingly. For example:</p>
  
  <pre><code>    {
          int current_value = int.Parse(this.craftOrderInput.text);
          if(current_value&gt;0)
              this.craftOrderInput.text = (current_value - 1) + "";
      }
  </code></pre>
  
  <p>But this obviously fails because the  <code>(current_value - 1) + "";</code> is a string, but input field expects an integer. Setting an integer like so <code>this.craftOrder.text = (current_value - 1) ;</code> obviously cannot compile because text component expects a string.
  I wanted to try Unity forums first but i cannot ask questions there because my style of writing reminds them of spam.</p>
  
  <p>tldr; How do i set int value of inputfield with Content Type set to Integer?</p>