1 using System.Collections;
2 using System.Collections.Generic;
6 namespace AVR.UI.Utils {
13 public float increase_amount = 0.1f;
14 public float decrease_amount = 0.1f;
15 public bool allowNegative =
true;
17 private InputField input;
18 private TMPro.TMP_InputField input_tmp;
21 input = GetComponent<InputField>();
22 input_tmp = GetComponent<TMPro.TMP_InputField>();
23 if(!input && !input_tmp) {
24 AVR.Core.AVR_DevConsole.cerror(
"Numeric Inputfield need either a InputField or a TMP_InputField component!",
this);
32 input.text = allowNegative ?
33 (float.Parse(input.text) + increase_amount).ToString()
35 (Mathf.Max(0,
float.Parse(input.text) + increase_amount)).ToString();
38 input_tmp.text = allowNegative ?
39 (float.Parse(input_tmp.text) + increase_amount).ToString()
41 (Mathf.Max(0,
float.Parse(input_tmp.text) + increase_amount)).ToString();
43 }
catch(System.Exception ) { }
50 input.text = allowNegative ?
51 (float.Parse(input.text) - decrease_amount).ToString()
53 (Mathf.Max(0,
float.Parse(input.text) - decrease_amount)).ToString();
57 input_tmp.text = allowNegative ?
58 (float.Parse(input_tmp.text) - decrease_amount).ToString()
60 (Mathf.Max(0,
float.Parse(input_tmp.text) - decrease_amount)).ToString();
62 }
catch(System.Exception) { }
Sets the documentation html file inside of Packages/com.avr.core/Documentation/html of a given class...